Public Member Functions | Protected Attributes | Friends | List of all members
TrainTestSets Class Reference

#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)
 

Detailed Description

Implements a class for storing training and testing sets for machine-learning methods.

Author
Mark Maloof
Version
1.0, 9/15/06

Constructor & Destructor Documentation

TrainTestSets::TrainTestSets ( )

Default constructor.

TrainTestSets::TrainTestSets ( const vector< string > &  options)
throw (logic_error
)

Explicit constructor that processes the specified arguments.

Parameters
optionsthe arguments for this train/test set
Exceptions
logic_errorif an option is illegal

Member Function Documentation

DataSet TrainTestSets::getTestingSet ( ) const

Returns the testing set of this train/test set.

Returns
a testing set
DataSet TrainTestSets::getTrainingSet ( ) const

Returns the training set of this train/test set.

Returns
a training 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.

Parameters
optionsthe arguments
Exceptions
logic_errorif an option is illegal
void TrainTestSets::setTestingSet ( const DataSet test)

Sets the testing set of this train/test set to the specified data set.

Parameters
testthe specified testing set
void TrainTestSets::setTrainingSet ( const DataSet train)

Sets the training set of this train/test set to the specified data set.

Parameters
trainthe specified training set

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const TrainTestSets tts 
)
friend

Writes the specified train-and-test sets to the output stream and returns it.

Parameters
outthe output stream for writing
ttsthe specified train-and-test sets for writing
Returns
the modified output stream

Member Data Documentation

DataSet TrainTestSets::test
protected

the testing examples

DataSet TrainTestSets::train
protected

the training examples


The documentation for this class was generated from the following files: