#include <traintestsets.h>
Public Member Functions | |
TrainTestSets () | |
TrainTestSets (const vector< string > &options) throw ( logic_error ) | |
DataSet | getTrainingSet () const |
DataSet | getTestingSet () const |
void | setTrainingSet (const DataSet &train) |
void | setTestingSet (const DataSet &test) |
void | setOptions (const vector< string > &options) throw ( logic_error ) |
Protected Attributes | |
DataSet | train |
DataSet | test |
Friends | |
ostream & | operator<< (ostream &out, const TrainTestSets &tts) |
Implements a class for storing training and testing sets for machine-learning methods.
TrainTestSets::TrainTestSets | ( | ) |
Default constructor.
TrainTestSets::TrainTestSets | ( | const vector< string > & | options | ) | |
throw | ( | logic_error | |||
) |
Explicit constructor that processes the specified arguments.
options | the arguments for this train/test set |
logic_error | if an option is illegal |
DataSet TrainTestSets::getTestingSet | ( | ) | const |
Returns the testing set of this train/test set.
DataSet TrainTestSets::getTrainingSet | ( | ) | const |
Returns the training set of this train/test set.
void TrainTestSets::setOptions | ( | const vector< string > & | options | ) | |
throw | ( | logic_error | |||
) |
Sets the options for this train/test set. -t
specifies the name of the training file to load. -T
specifies the name of the testing file to load.
options | the arguments |
logic_error | if an option is illegal |
void TrainTestSets::setTestingSet | ( | const DataSet & | test | ) |
Sets the testing set of this train/test set to the specified data set.
test | the specified testing set |
void TrainTestSets::setTrainingSet | ( | const DataSet & | train | ) |
Sets the training set of this train/test set to the specified data set.
train | the specified training set |
|
friend |
Writes the specified train-and-test sets to the output stream and returns it.
out | the output stream for writing |
tts | the specified train-and-test sets for writing |
|
protected |
the testing examples
|
protected |
the training examples