|
Public Member Functions |
|
| InstanceSet () |
| | Empty constructor.
|
|
void | save_var (int var, vector< float > *target) |
| | copy a variable array out
|
|
void | load_var (int var, const vector< float > &) |
| | load a variable array in
|
| void | permute (int var, unsigned int *seed) |
| | permute a variable's instances (shuffle)
|
|
void | create_sorted_indices () |
| | sort the variables
|
|
const vector< int > & | get_sorted_indices (int attribute) const |
| | Sorted indices (available after create_sorted_indices).
|
|
int | mode_label () const |
| | Most common label.
|
|
unsigned char | label (int i) const |
| | Get a particular instance's label.
|
|
unsigned int | size () const |
| | Number of instances.
|
|
unsigned int | num_attributes () const |
| | Number of attributes.
|
|
float | get_attribute (int i, int attr) const |
| | Get a particular instance's attribute.
|
|
string | get_varname (int i) const |
| | Get a variable name (useful if there is a header with var.
|
Static Public Member Functions |
| InstanceSet * | create_subset (const InstanceSet &, const weight_list &) |
| | Named constructor - create a subset from an existing instanceset.
|
|
InstanceSet * | load_csv_and_labels (const string &data, const string &labels, bool header=false, const string &delim=",") |
| | Named constructor - load from csv file and a label file.
|
| InstanceSet * | load_libsvm (const string &data, int num_features) |
| | Load from a libsvm formatted file.
|