Template class for performing cross-validation on the regularization parameter and the number of PPCs: derived-from-CV_base thorugh CRTP ('CV_alpha_k' its template D parameter).
More...
|
| template<typename STOR_OBJ, typename STRATEGY> |
| | CV_alpha_k (STOR_OBJ &&Data, STRATEGY &&strategy, const std::vector< double > &alphas, const std::vector< int > &k_s, double toll, const pred_func_t< K_IMP::YES > &pred_f, int number_threads) |
| | Constructor for derived class: constructs firstly CV_base<CV_alpha_k,...>
|
| |
| double | alpha_best () const |
| | Getter for the best regularization parameter.
|
| |
| double | k_best () const |
| | Getter for the best number of retained PPCs.
|
| |
| std::vector< double > | valid_errors_best_pairs () const |
| | Getter for validation errors for the best pairs.
|
| |
| std::vector< std::vector< double > > | valid_errors () const |
| | Getter for validation errors.
|
| |
| double | best_valid_error () const |
| | Getter for the best validation error.
|
| |
| void | best_param_search () |
| | Retaining the best pair regularization parameter-number of retained PPCs.
|
| |
| 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.
|
| |
| | 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.
|
| |
Template class for performing cross-validation on the regularization parameter and the number of PPCs: derived-from-CV_base thorugh CRTP ('CV_alpha_k' its template D parameter).
- Template Parameters
-
| cv_strat | strategy for splitting training/validation sets |
| err_eval | how to evaluate the loss between prediction on validation set and validation set |
| k_imp | if k is imposed or has to be found through explanatory power criterion (necessary k_imp=K_IMP::YES since k is imposed at each cv iteration) |
| valid_err_ret | if validation error are stored |
Derived class. Polymorphism is known at compile time thanks to Curiously Recursive Template Pattern (CRTP)