Contains methods to check and wrap R-inputs into PPCKO-coherent ones. More...
#include <vector>#include <algorithm>#include <numeric>#include <iostream>#include <utility>#include <string>#include <stdexcept>#include "traits_ko.hpp"#include "mesh.hpp"Go to the source code of this file.
Enumerations | |
| enum | REM_NAN { NR = 0 , MR = 1 , ZR = 2 } |
| The available strategy for removing non-dummy NaNs. More... | |
Functions | |
| std::string | wrap_string_CV_to_be_printed (const std::string &id_cv) |
| Creating a string to print on the screen which PPCKO version is being used. | |
| void | check_threshold_ppc (const double &threshold_ppc) |
| Check if 'threshold_ppc' input is between 0 and 1. Eventually, raises and error. | |
| void | check_alpha (const double &alpha) |
| Check if 'alpha' input is greater than 0. Eventually, raises and error. | |
| void | check_k (const int &k, const int &max_k) |
| Check if 'k' input is an integer between 0 and the number of available evaluations of the functional object. Eventually, raises and error. | |
| void | check_solver (bool solver_ex, const std::string &id_cv, int k) |
| Check if, if using 'gep_solver', the number of PPCs is not retrieved through explanatory power criterion. Eventually, raises and error. | |
| std::vector< double > | wrap_alpha_vec (Rcpp::Nullable< Rcpp::NumericVector > alpha_vec) |
| Wrapping the R-vector representing the regularization parameter input space into a coherent C++ object, checking parameters consistency, eventually throwing an error, eventually sorting them in increasing order. | |
| std::vector< int > | wrap_k_vec (Rcpp::Nullable< Rcpp::IntegerVector > k_vec, int k_max) |
| Wrapping the R-vector representing the number of PPCs input space into a coherent C++ object, checking parameters consistency, eventually throwing an error, eventually sorting them in increasing order. | |
| std::vector< double > | wrap_disc_ev (Rcpp::Nullable< Rcpp::NumericVector > disc_ev, double a, double b, int dim) |
| Wrapping the points over which the discrete evaluations of the functional object are available. Check consistency of domain extremes and passed points, eventualy throwing an error. | |
| std::pair< int, int > | wrap_sizes_set_CV (Rcpp::Nullable< int > min_size_ts, Rcpp::Nullable< int > max_size_ts, int number_time_instants) |
| Wrapping the minimum and maximum dimension of the training set, checking their consitency, eventually raising an error. | |
| int | wrap_num_thread (Rcpp::Nullable< int > num_threads) |
| Wrapping the number of threads for OMP. | |
| REM_NAN | wrap_id_rem_nans (Rcpp::Nullable< std::string > id_rem_nan) |
| Wrapping the strategy for handling non-dummy NaNs. | |
Contains methods to check and wrap R-inputs into PPCKO-coherent ones.
| enum REM_NAN |
|
inline |
Check if 'alpha' input is greater than 0. Eventually, raises and error.
| alpha | regularization parameter |
|
inline |
Check if 'k' input is an integer between 0 and the number of available evaluations of the functional object. Eventually, raises and error.
| k | number of PPCs passed as parameter |
| max_k | the maximum value for 'k' (number of available evaluations of the functional object) |
|
inline |
Check if, if using 'gep_solver', the number of PPCs is not retrieved through explanatory power criterion. Eventually, raises and error.
| solver_ex | 'true' if using ex_solver |
| id_cv | which PPCKO version is used |
| k | the input parameter k |
|
inline |
Check if 'threshold_ppc' input is between 0 and 1. Eventually, raises and error.
| threshold_ppc | requested explanatory power for the predictor |
|
inline |
Wrapping the R-vector representing the regularization parameter input space into a coherent C++ object, checking parameters consistency, eventually throwing an error, eventually sorting them in increasing order.
| alpha_vec | Rcpp::Nullable<Rcpp::NumericVector> |
|
inline |
Wrapping the points over which the discrete evaluations of the functional object are available. Check consistency of domain extremes and passed points, eventualy throwing an error.
| disc_ev | Rcpp::Nullable<Rcpp::NumericVector> containing the domain points |
| a | left domain extreme |
| b | right domain extreme |
| dim | the number of discrete evaluations |
|
inline |
Wrapping the strategy for handling non-dummy NaNs.
| id_rem_nan | string indicating the straegy for removing non-dummy NaNs |
|
inline |
Wrapping the R-vector representing the number of PPCs input space into a coherent C++ object, checking parameters consistency, eventually throwing an error, eventually sorting them in increasing order.
| k_vec | Rcpp::Nullable<Rcpp::IntegerVector> |
| k_max | the maximum number possible of retained PPCs |
|
inline |
Wrapping the number of threads for OMP.
| num_threads | indicates how many threads to be used by multi-threading directives. |
if omp is not included: will return 1. If not, a number going from 1 up to the maximum cores available by the machine used (default, or if the input is smaller than 1 or bigger than the maximum number of available cores)
|
inline |
Wrapping the minimum and maximum dimension of the training set, checking their consitency, eventually raising an error.
| min_size_ts | minimum dimension of the training set |
| max_size_ts | maximum dimension of the training set |
| number_time_instants | number of total time instants available |
|
inline |
Creating a string to print on the screen which PPCKO version is being used.
| id_cv | string indicating the version used |