37#ifndef STK_CVHANDLER_H
38#define STK_CVHANDLER_H
71 inline virtual bool run()
86 template<
class xData,
class yData>
111 , rangeData_(rangeData), nbFolds_(nbFolds)
112 , partitions_(), sizePartitions_()
165template<
class xData,
class yData>
In this file we implement the final class CArrayVector.
#define STKERROR_NO_ARG(Where, Error)
#define STKRUNTIME_ERROR_1ARG(Where, Arg, Error)
#define STKERROR_1ARG(Where, Arg, Error)
This file include all the other header files of the project Sdk.
CvHanler is an utility function for building the submatrix/subvectors needed when using k-folds cross...
CVectorXi partitions_
repartition of the sample into k-folds
CVectorXi const & partitions() const
Range rangeData_
Range of the data set (number of rows)
void partition()
create a random partition in k folds
bool getKFold(int k, Data const &x, Data &xFold, Data &xTest)
get the data set when setting out fold k and test data set
virtual ~CvHandler()
destructor
void setData(Range const &rangeData, int nbFolds)
CVectorXi sizePartitions_
size of each fold
int nbFolds_
Number of folds.
CvHandler(Range const &rangeData, int nbFolds)
Default constructor.
Range const & rangeData() const
virtual bool run()
run the computations.
CVectorXi const & sizePartitions() const
Derived & resize(Range const &I, Range const &J)
resize the Array.
void clear()
clear all allocated memory .
Abstract base class for all classes having a.
String msg_error_
String with the last error message.
bool hasRun_
true if run has been used, false otherwise
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
Index sub-vector region: Specialization when the size is unknown.
int size() const
get the size of the TRange (the number of elements).
The namespace STK is the main domain space of the Statistical ToolKit project.
TRange< UnknownSize > Range