|
STK++ 0.9.13
|
CvHanler is an utility function for building the submatrix/subvectors needed when creating learning and test data sets. More...
#include <STK_PartitionHandler.h>

Public Member Functions | |
| PartitionHandler (Range const &rangeData, Real prop) | |
| Default constructor. | |
| virtual | ~PartitionHandler () |
| destructor | |
| Real const & | proportion () const |
| Range const & | rangeData () const |
| CVectorXi const & | partitions () const |
| virtual bool | run () |
| run the computations. | |
| void | setData (Range const &rangeData, Real prop) |
| template<class Data > | |
| bool | getPartitions (Data const &x, Data &xLearn, Data &xTest) |
| get the data set when setting out fold k and test data set | |
| template<class xData , class yData > | |
| bool | getPartitions (xData const &x, xData &xLearn, xData &xTest, yData const &y, yData &yLearn, yData &yTest) |
| get the data set when setting out fold k and test data set | |
Public Member Functions inherited from STK::IRunnerBase | |
| String const & | error () const |
| get the last error message. | |
Protected Member Functions | |
| void | partition () |
| create a random partition | |
Protected Member Functions inherited from STK::IRunnerBase | |
| IRunnerBase () | |
| default constructor | |
| IRunnerBase (IRunnerBase const &runner) | |
| copy constructor | |
| virtual | ~IRunnerBase () |
| destructor | |
| virtual void | update () |
| update the runner. | |
Private Attributes | |
| Range | rangeData_ |
| Range of the data set (number of rows) | |
| Real | prop_ |
| proportion | |
| int | sizeTest_ |
| size of the test (should | |
| CVectorXi | partitions_ |
| repartition of the sample into k-folds | |
Additional Inherited Members | |
Protected Attributes inherited from STK::IRunnerBase | |
| String | msg_error_ |
| String with the last error message. | |
| bool | hasRun_ |
true if run has been used, false otherwise | |
CvHanler is an utility function for building the submatrix/subvectors needed when creating learning and test data sets.
Definition at line 18 of file STK_PartitionHandler.h.
Default constructor.
| rangeData | prop range of the data to partition |
| prop | to set in test data |
Definition at line 74 of file STK_PartitionHandler.h.
References PartitionHandler(), prop_, and STKRUNTIME_ERROR_1ARG.
Referenced by PartitionHandler().
|
inlinevirtual |
| bool STK::PartitionHandler::getPartitions | ( | Data const & | x, |
| Data & | xLearn, | ||
| Data & | xTest | ||
| ) |
get the data set when setting out fold k and test data set
Definition at line 88 of file STK_PartitionHandler.h.
References getPartitions(), STK::IRunnerBase::hasRun_, STK::IRunnerBase::msg_error_, partitions_, rangeData_, run(), sizeTest_, and STKERROR_NO_ARG.
Referenced by getPartitions().
| bool STK::PartitionHandler::getPartitions | ( | xData const & | x, |
| xData & | xLearn, | ||
| xData & | xTest, | ||
| yData const & | y, | ||
| yData & | yLearn, | ||
| yData & | yTest | ||
| ) |
get the data set when setting out fold k and test data set
Definition at line 124 of file STK_PartitionHandler.h.
References STK::IRunnerBase::hasRun_, STK::IRunnerBase::msg_error_, partitions_, rangeData_, run(), sizeTest_, and STKERROR_NO_ARG.
|
inlineprotected |
create a random partition
Definition at line 169 of file STK_PartitionHandler.h.
References partitions_, STK::Law::UniformDiscrete::rand(), rangeData_, STK::ICArray< Derived >::resize(), and sizeTest_.
Referenced by run().
Definition at line 32 of file STK_PartitionHandler.h.
References rangeData_.
Referenced by setData().
run the computations.
true if no error occur during the running process, false otherwise Implements STK::IRunnerBase.
Definition at line 36 of file STK_PartitionHandler.h.
References STK::IRunnerBase::hasRun_, and partition().
Referenced by getPartitions(), and getPartitions().
Definition at line 39 of file STK_PartitionHandler.h.
References STK::ICArray< Derived >::clear(), STK::IRunnerBase::hasRun_, partitions_, prop_, rangeData(), rangeData_, STK::TRange< UnknownSize >::size(), and sizeTest_.
|
private |
repartition of the sample into k-folds
Definition at line 67 of file STK_PartitionHandler.h.
Referenced by getPartitions(), getPartitions(), partition(), partitions(), and setData().
|
private |
proportion
Definition at line 63 of file STK_PartitionHandler.h.
Referenced by PartitionHandler(), proportion(), and setData().
|
private |
Range of the data set (number of rows)
Definition at line 61 of file STK_PartitionHandler.h.
Referenced by getPartitions(), getPartitions(), partition(), rangeData(), and setData().
|
private |
size of the test (should
Definition at line 65 of file STK_PartitionHandler.h.
Referenced by getPartitions(), getPartitions(), partition(), and setData().