3#ifndef STK_PARTITIONHANDLER_H
4#define STK_PARTITIONHANDLER_H
36 inline virtual bool run()
51 template<
class xData,
class yData>
76 , rangeData_(rangeData), prop_(
prop)
77 , sizeTest_(
int(rangeData_.size()*prop_))
123template<
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)
This file include all the other header files of the project Sdk.
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...
CvHanler is an utility function for building the submatrix/subvectors needed when creating learning a...
PartitionHandler(Range const &rangeData, Real prop)
Default constructor.
void partition()
create a random partition
virtual bool run()
run the computations.
virtual ~PartitionHandler()
destructor
CVectorXi partitions_
repartition of the sample into k-folds
Range rangeData_
Range of the data set (number of rows)
Range const & rangeData() const
void setData(Range const &rangeData, Real prop)
bool getPartitions(Data const &x, Data &xLearn, Data &xTest)
get the data set when setting out fold k and test data set
Real const & proportion() const
CVectorXi const & partitions() const
int sizeTest_
size of the test (should
Index sub-vector region: Specialization when the size is unknown.
int size() const
get the size of the TRange (the number of elements).
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.