Public Member Functions | |
DataSet (Attribute[] attrs, String[] labels) | |
void | addInstance (String[] values, String label) |
DataSet | copyStruct () |
void | shuffle () |
Public Attributes | |
ArrayList< Attribute > | attributes |
ArrayList< String > | attributeNames |
ArrayList< String > | labels |
ArrayList< Instance > | instances |
DataSet Class. Parse a file into a data set, used both for training set and test set.
The attribute IS order in each dataset inside, but not required to be in the same order in different data set.
To find the value of an arbitary attribute, the best way is to use insts.attributes(trainSet.attri.indexOf("SomeAttribute"))
|
inline |
|
inline |
Add an instance into the data set
values | String array of value of each attribute, in the order of attributes field |
label | Label of this instance |
|
inline |
Make a copy of attributes and labels of the current data set
|
inline |
Shuffle the instances in the data set
ArrayList<String> DataSet.attributeNames |
List of attributes names
ArrayList<Attribute> DataSet.attributes |
List of attributes values
ArrayList<Instance> DataSet.instances |
List of instances
ArrayList<String> DataSet.labels |
List of labels