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

Template class for performing cross-validation. More...

#include <CV.hpp>

Public Member Functions

template<typename STOR_OBJ, typename STRATEGY>
 CV_base (STOR_OBJ &&Data, STRATEGY &&strategy, int number_threads)
 Constructor for the class.
 
KO_Traits::StoringMatrix Data () const
 Getter for the data matrix.
 
cv_strategy< cv_strat > strategy () const
 Getter for the training/validation set splitting.
 
int number_threads () const
 Getter for the number of threads for OMP.
 
double err_valid_set_eval (const KO_Traits::StoringVector &pred, const KO_Traits::StoringVector &valid, int number_threads) const
 Evaluation of the loss between prediction on validation set and validation set: estimate of L2 norm loss. Tag-dispacther.
 

Detailed Description

template<class D, CV_STRAT cv_strat, CV_ERR_EVAL err_eval, K_IMP k_imp, VALID_ERR_RET valid_err_ret>
class CV_base< D, cv_strat, err_eval, k_imp, valid_err_ret >

Template class for performing cross-validation.

Template Parameters
Dtype of the derived class (for static polymorphism thorugh CRTP):
cv_stratstrategy for splitting training/validation sets
err_evalhow to evaluate the loss between prediction on validation set and validation set
k_impif k is imposed or has to be found through explanatory power criterion
valid_err_retif validation error are stored

It is the base class. Polymorphism is known at compile time thanks to Curiously Recursive Template Pattern (CRTP)

Constructor & Destructor Documentation

◆ CV_base()

template<class D, CV_STRAT cv_strat, CV_ERR_EVAL err_eval, K_IMP k_imp, VALID_ERR_RET valid_err_ret>
template<typename STOR_OBJ, typename STRATEGY>
CV_base< D, cv_strat, err_eval, k_imp, valid_err_ret >::CV_base ( STOR_OBJ && Data,
STRATEGY && strategy,
int number_threads )
inline

Constructor for the class.

Parameters
Datafts matrix
strategystrategy for splitting training/validation sets
number_threadsnumber of threads for OMP

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

Member Function Documentation

◆ Data()

template<class D, CV_STRAT cv_strat, CV_ERR_EVAL err_eval, K_IMP k_imp, VALID_ERR_RET valid_err_ret>
KO_Traits::StoringMatrix CV_base< D, cv_strat, err_eval, k_imp, valid_err_ret >::Data ( ) const
inline

Getter for the data matrix.

Returns
the private m_Data

◆ err_valid_set_eval()

template<class D, CV_STRAT cv_strat, CV_ERR_EVAL err_eval, K_IMP k_imp, VALID_ERR_RET valid_err_ret>
double CV_base< D, cv_strat, err_eval, k_imp, valid_err_ret >::err_valid_set_eval ( const KO_Traits::StoringVector & pred,
const KO_Traits::StoringVector & valid,
int number_threads ) const
inline

Evaluation of the loss between prediction on validation set and validation set: estimate of L2 norm loss. Tag-dispacther.

Parameters
predprediction on validation set
validvalidation set
number_threadsnumber of threads for multi-threading
Returns
the error between prediction on validation set and validation set

◆ number_threads()

template<class D, CV_STRAT cv_strat, CV_ERR_EVAL err_eval, K_IMP k_imp, VALID_ERR_RET valid_err_ret>
int CV_base< D, cv_strat, err_eval, k_imp, valid_err_ret >::number_threads ( ) const
inline

Getter for the number of threads for OMP.

Returns
the private m_number_threads

◆ strategy()

template<class D, CV_STRAT cv_strat, CV_ERR_EVAL err_eval, K_IMP k_imp, VALID_ERR_RET valid_err_ret>
cv_strategy< cv_strat > CV_base< D, cv_strat, err_eval, k_imp, valid_err_ret >::strategy ( ) const
inline

Getter for the training/validation set splitting.

Returns
the private m_strategy

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