public class TrainTestSets extends java.lang.Object implements OptionHandler
| Modifier and Type | Field and Description |
|---|---|
protected DataSet |
test
the testing examples
|
protected DataSet |
train
the training examples
|
| Constructor and Description |
|---|
TrainTestSets()
Default constructor.
|
TrainTestSets(DataSet train,
DataSet test)
Explicit constructor that sets the training and testing sets to
the specified data sets.
|
TrainTestSets(java.lang.String[] options)
Explicit constructor that processes the specified arguments.
|
| Modifier and Type | Method and Description |
|---|---|
DataSet |
getTestingSet()
Returns the testing set of this train/test set.
|
DataSet |
getTrainingSet()
Returns the training set of this train/test set.
|
void |
setOptions(java.lang.String[] options)
Sets the options for this train/test set.
|
void |
setTestingSet(DataSet test)
Sets the testing set of this train/test set to the specified data set.
|
void |
setTrainingSet(DataSet train)
Sets the training set of this train/test set to the specified data set.
|
java.lang.String |
toString()
Returns a string representation of this train/test set in a format similar
to that of the file format.
|
protected DataSet train
protected DataSet test
public TrainTestSets()
public TrainTestSets(java.lang.String[] options)
throws java.lang.Exception
options - the arguments for this train/test setjava.lang.Exception - if the file is not found or if a parsing exception occurspublic DataSet getTrainingSet()
public DataSet getTestingSet()
public void setTrainingSet(DataSet train)
train - the specified training setpublic void setTestingSet(DataSet test)
test - the specified testing setpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-t
option loads the data set with the specified file name as the
training set. The -T option loads the data set
with the specified file name as the testing set.setOptions in interface OptionHandleroptions - the argumentsjava.lang.Exception - if the file is not found or if a parsing exception occurspublic java.lang.String toString()
toString in class java.lang.Object