1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::Vecchia Class Reference

#include <Vecchia.hpp>

Inheritance diagram for gstlrn::Vecchia:
gstlrn::ALikelihood gstlrn::AModelOptim

Public Member Functions

 Vecchia (ModelGeneric *model, Id nb_neigh, const Db *db1, const Db *db2=nullptr, bool reml=false)
 
 Vecchia (const Vecchia &r)
 
Vecchiaoperator= (const Vecchia &r)
 
virtual ~Vecchia ()
 
Id computeLower (const MatrixT< Id > &Ranks, bool verbose=false)
 Construct the Vecchia approximation starting from 'Ranks'.
 
const MatrixSparsegetLFull () const
 
const & getDFull () const
 
const & getY () const
 
double getLFull (Id i, Id j) const
 
Id getND () const
 
Id getNT () const
 
Id getNonZeros () const
 
void productMatVecchia (const MatrixDense &X, MatrixDense &resmat) const
 
void productVecchia (constvect Y, vect res) const
 
 calculateLdY (const 1 &Y) const
 
 calculateFtLdY (const 1 &LdY) const
 
MatrixSparsecalculateW (const 1 &D_dd) const
 
- Public Member Functions inherited from gstlrn::ALikelihood
 ALikelihood (ModelGeneric *model, const Db *db, bool reml=false)
 
 ALikelihood (const ALikelihood &r)
 
ALikelihoodoperator= (const ALikelihood &r)
 
virtual ~ALikelihood ()
 
void init (bool verbose=false)
 
double computeCost (bool verbose=false) override
 
double computeLogLikelihood (bool verbose=false)
 
- Public Member Functions inherited from gstlrn::AModelOptim
 AModelOptim (ModelGeneric *model=nullptr, bool verbose=false)
 
void setEnvironment (const MatrixSymmetric &vars, double href)
 
AModelOptimoperator= (const AModelOptim &r)
 
void setAuthorizedAnalyticalGradients (bool authorized)
 
bool getAuthorizedAnalyticalGradients () const
 
virtual ~AModelOptim ()
 
void setGradients (std::vector< std::function< double(const std::vector< double > &)> > &gradients)
 
void setVerbose (bool verbose=false, bool trace=false)
 
double eval (const std::vector< double > &x)
 
virtual void evalGrad (vect res)
 
void run ()
 
void resetIter ()
 

Static Public Member Functions

static VecchiacreateForOptim (ModelGeneric *model, const Db *db1, Id nb_neigh=30, bool reml=false)
 

Constructor & Destructor Documentation

◆ Vecchia() [1/2]

gstlrn::Vecchia::Vecchia ( ModelGeneric model,
Id  nb_neigh,
const Db db1,
const Db db2 = nullptr,
bool  reml = false 
)

◆ Vecchia() [2/2]

gstlrn::Vecchia::Vecchia ( const Vecchia r)

◆ ~Vecchia()

gstlrn::Vecchia::~Vecchia ( )
virtual

Member Function Documentation

◆ calculateFtLdY()

gstlrn::Vecchia::calculateFtLdY ( const 1 &  LdY) const

◆ calculateLdY()

gstlrn::Vecchia::calculateLdY ( const 1 &  Y) const

◆ calculateW()

MatrixSparse * gstlrn::Vecchia::calculateW ( const 1 &  D_dd) const

Product 't(A)' %*% 'M' %*% 'A' or 'A' %*% 'M' %*% 't(A)'

◆ computeLower()

Id gstlrn::Vecchia::computeLower ( const MatrixT< Id > &  Ranks,
bool  verbose = false 
)

Construct the Vecchia approximation starting from 'Ranks'.

Parameters
RanksMatrixT<Id> which the ranks of the sample indices for each target
verboseVerbose flag
Returns
Id Error returned code
Note
The dimension of 'Rank' is:
  • ncols = Dimension of the Neighborhood + 1
  • nrows = Number of samples (dbin and dbout [optional])
For each row, the first element of 'Ranks' is the sample number
  • if smaller than N_dbin, it refers to the sample absolute rank in 'dbin'
  • if larger, its value (after subtracting N_dbin) gives the sample absolute rank in 'dbout'

◆ createForOptim()

Vecchia * gstlrn::Vecchia::createForOptim ( ModelGeneric model,
const Db db1,
Id  nb_neigh = 30,
bool  reml = false 
)
static

◆ getDFull()

const & gstlrn::Vecchia::getDFull ( ) const
inline

◆ getLFull() [1/2]

const MatrixSparse & gstlrn::Vecchia::getLFull ( ) const
inline

◆ getLFull() [2/2]

double gstlrn::Vecchia::getLFull ( Id  i,
Id  j 
) const
inline

◆ getND()

Id gstlrn::Vecchia::getND ( ) const
inline

◆ getNonZeros()

Id gstlrn::Vecchia::getNonZeros ( ) const
inline

◆ getNT()

Id gstlrn::Vecchia::getNT ( ) const
inline

◆ getY()

const & gstlrn::Vecchia::getY ( ) const
inline

◆ operator=()

Vecchia & gstlrn::Vecchia::operator= ( const Vecchia r)

◆ productMatVecchia()

void gstlrn::Vecchia::productMatVecchia ( const MatrixDense X,
MatrixDense resmat 
) const

◆ productVecchia()

void gstlrn::Vecchia::productVecchia ( constvect  Y,
vect  res 
) const

The documentation for this class was generated from the following files: