PPCKO: Principal Predictive Components for Estimating an Autoregressive Operator
 
Loading...
Searching...
No Matches
PPC_KO_NoCV< solver, k_imp, valid_err_ret, cv_strat, cv_err_eval > Class Template Reference

Derived from 'PPC_KO_base' class for computing PPCKO algorithm without cross-validation. More...

#include <PPC_KO_NoCV.hpp>

Inheritance diagram for PPC_KO_NoCV< solver, k_imp, valid_err_ret, cv_strat, cv_err_eval >:
PPC_KO_base< PPC_KO_NoCV< solver, k_imp, valid_err_ret, cv_strat, cv_err_eval >, solver, k_imp, valid_err_ret, cv_strat, cv_err_eval >

Public Member Functions

template<typename STOR_OBJ>
 PPC_KO_NoCV (STOR_OBJ &&X, double alpha, int k, int number_threads)
 Constructor for no cv version if k is passed as parameter.
 
template<typename STOR_OBJ>
 PPC_KO_NoCV (STOR_OBJ &&X, double alpha, double threshold_ppc, int number_threads)
 Constructor for no cv version if k is selected through explanatory power criterion.
 
void solving ()
 Method to perform PPCKO if no cv is performed.
 
- Public Member Functions inherited from PPC_KO_base< PPC_KO_NoCV< solver, k_imp, valid_err_ret, cv_strat, cv_err_eval >, solver, k_imp, valid_err_ret, cv_strat, cv_err_eval >
 PPC_KO_base (STOR_OBJ &&X, int number_threads)
 Constructor: centers data, evaluate mean function, sample covariance, sample cross-covariance and its square.
 
std::size_t m () const
 Getter for the number of evaluation of the curve/surface.
 
std::size_t n () const
 Getter for the number of time instants.
 
KO_Traits::StoringMatrix X () const
 Getter for fts data matrix (centered)
 
KO_Traits::StoringArray means () const
 Getter for the mean function.
 
KO_Traits::StoringMatrix Cov () const
 Getter for the covariance operator estimate.
 
double trace_cov () const
 Getter for the covariance operator estimate's trace.
 
KO_Traits::StoringMatrixCovReg ()
 Setter for the regularized sample covariance operator.
 
KO_Traits::StoringMatrix rho () const
 Getter for the autoregressive operator estimate.
 
KO_Traits::StoringMatrix a () const
 Getter for the predictive loadings (PPCs directions)
 
KO_Traits::StoringMatrix b () const
 Getter for the predictive factors factor (PPCs weights)
 
std::vector< double > explanatory_power () const
 Getter for the cumulative explanatory power of the PPCs.
 
double alpha () const
 Getter for the regularization parameter.
 
double & alpha ()
 Setter for the regularization parameter.
 
int k () const
 Getter for the number of retained PPCs.
 
int & k ()
 Setter for the number of retained PPCs.
 
double threshold_ppc () const
 Getter for the requested explanatory power of the retained PPCs.
 
double & threshold_ppc ()
 Setter for the requested explanatory power of the retained PPCs.
 
valid_err_variant ValidErr () const
 Getter for the validation errors.
 
valid_err_variant & ValidErr ()
 Setter for the validation errors.
 
int number_threads () const
 Getter for the number of threads for OMP.
 
std::tuple< int, KO_Traits::StoringVector, KO_Traits::StoringMatrixPPC_retained ()
 Retaining the the PPCs: pairs eigenvalue-eigenvector and their number.
 
void KO_algo ()
 Performing PPCKO algorithm once regularization parameter is selected and k or it is fixed or to be retained through explanatory power. Computes PPCs, direction and weight, their number and their cumulative explanatory power, and the estimate of the autoregressive operator.
 
KO_Traits::StoringArray prediction () const
 Performs one-step ahead prediction of the fts. The mean function is added.
 
std::vector< double > scores () const
 Computes the scores of the PPCs, defined as scalar product between the direction and the fts at the last instant.
 
std::vector< std::array< double, 2 > > sd_scores_dir_wei () const
 Computes the standard deviation of the scores of directions and weights.
 
void solve ()
 Method to solve PPCKO according to which cross-validation is performed, if any.
 

Detailed Description

template<SOLVER solver, K_IMP k_imp, VALID_ERR_RET valid_err_ret, CV_STRAT cv_strat, CV_ERR_EVAL cv_err_eval>
class PPC_KO_NoCV< solver, k_imp, valid_err_ret, cv_strat, cv_err_eval >

Derived from 'PPC_KO_base' class for computing PPCKO algorithm without cross-validation.

Template Parameters
solverif algorithm solved inverting the regularized covariance or avoiding it through gep (not possible if retaining the number of PPCs with explanatory power criterion)
k_impif k is imposed or has to be found through explanatory power criterion
valid_err_retif validation error are stored
cv_stratstrategy for splitting training/validation sets
err_evalhow to evaluate the loss between prediction on validation set and validation set

Constructor & Destructor Documentation

◆ PPC_KO_NoCV() [1/2]

template<SOLVER solver, K_IMP k_imp, VALID_ERR_RET valid_err_ret, CV_STRAT cv_strat, CV_ERR_EVAL cv_err_eval>
template<typename STOR_OBJ>
PPC_KO_NoCV< solver, k_imp, valid_err_ret, cv_strat, cv_err_eval >::PPC_KO_NoCV ( STOR_OBJ && X,
double alpha,
int k,
int number_threads )
inline

Constructor for no cv version if k is passed as parameter.

Parameters
Xfts
alpharegularization parameter
knumber of retained PPCs
number_threadsnumber of threads for OMP

Universal constructor: move semantic used to optimazing handling big size objects

◆ PPC_KO_NoCV() [2/2]

template<SOLVER solver, K_IMP k_imp, VALID_ERR_RET valid_err_ret, CV_STRAT cv_strat, CV_ERR_EVAL cv_err_eval>
template<typename STOR_OBJ>
PPC_KO_NoCV< solver, k_imp, valid_err_ret, cv_strat, cv_err_eval >::PPC_KO_NoCV ( STOR_OBJ && X,
double alpha,
double threshold_ppc,
int number_threads )
inline

Constructor for no cv version if k is selected through explanatory power criterion.

Parameters
Xfts
alpharegularization parameter
threshold_ppcrequested explanatory power of the retained PPCs
number_threadsnumber of threads for OMP

Universal constructor: move semantic used to optimazing handling big size objects

Member Function Documentation

◆ solving()

template<SOLVER solver, K_IMP k_imp, VALID_ERR_RET valid_err_ret, CV_STRAT cv_strat, CV_ERR_EVAL cv_err_eval>
void PPC_KO_NoCV< solver, k_imp, valid_err_ret, cv_strat, cv_err_eval >::solving ( )
inline

Method to perform PPCKO if no cv is performed.

Wraps the .KO_algo() method of the base class since parameters are known


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