Example usage for Java weka.core Instance fields, constructors, methods, implement or subclass
The text is from its open source code.
Attribute | attribute(int index) Returns the attribute with the given index. |
Attribute | attributeSparse(int indexOfIndex) Returns the attribute with the given index in the sparse representation. |
Attribute | classAttribute() Returns class attribute. |
int | classIndex() Returns the class attribute's index. |
boolean | classIsMissing() Tests if an instance's class is missing. |
double | classValue() Returns an instance's class value as a floating-point number. |
Object | copy() This method produces a shallow copy of an object. |
Instance | copy(double[] values) Copies the instance but fills up its values based on the given array of doubles. |
Instances | dataset() Returns the dataset this instance has access to. |
void | deleteAttributeAt(int position) Deletes an attribute at the given position (0 to numAttributes() - 1). |
Enumeration | enumerateAttributes() Returns an enumeration of all the attributes. |
boolean | hasMissingValue() Tests whether an instance has a missing value. |
int | index(int position) Returns the index of the attribute stored at the given position in the sparse representation. |
void | insertAttributeAt(int position) Inserts an attribute at the given position (0 to numAttributes()). |
boolean | isMissing(int attIndex) Tests if a specific value is "missing". |
boolean | isMissing(Attribute att) Tests if a specific value is "missing". |
boolean | isMissingSparse(int indexOfIndex) Tests if a specific value is "missing" in the sparse representation. |
int | numAttributes() Returns the number of attributes. |
int | numClasses() Returns the number of class labels. |
int | numValues() Returns the number of values present in a sparse representation. |
Instances | relationalValue(int attIndex) Returns the relational value of a relational attribute. |
Instances | relationalValue(Attribute att) Returns the relational value of a relational attribute. |
void | replaceMissingValues(double[] array) Replaces all missing values in the instance with the values contained in the given array. |
void | setClassMissing() Sets the class value of an instance to be "missing". |
void | setClassValue(double value) Sets the class value of an instance to the given value (internal floating-point format). |
void | setClassValue(String value) Sets the class value of an instance to the given value. |
void | setDataset(Instances instances) Sets the reference to the dataset. |
void | setMissing(int attIndex) Sets a specific value to be "missing". |
void | setMissing(Attribute att) Sets a specific value to be "missing". |
void | setValue(int attIndex, double value) Sets a specific value in the instance to the given value (internal floating-point format). |
void | setValue(int attIndex, String value) Sets a value of a nominal or string attribute to the given value. |
void | setValue(Attribute att, double value) Sets a specific value in the instance to the given value (internal floating-point format). |
void | setValue(Attribute att, String value) Sets a value of an nominal or string attribute to the given value. |
void | setValueSparse(int indexOfIndex, double value) Sets a specific value in the instance to the given value (internal floating-point format), given an index into the sparse representation. |
void | setWeight(double weight) Sets the weight of an instance. |
String | stringValue(int attIndex) Returns the value of a nominal, string, date, or relational attribute for the instance as a string. |
String | stringValue(Attribute att) Returns the value of a nominal, string, date, or relational attribute for the instance as a string. |
double[] | toDoubleArray() Returns the values of each attribute as an array of doubles. |
String | toString(int attIndex) Returns the description of one value of the instance as a string. |
String | toString(Attribute att) Returns the description of one value of the instance as a string. |
double | value(int attIndex) Returns an instance's attribute value in internal format. |
double | value(Attribute att) Returns an instance's attribute value in internal format. |
double | valueSparse(int indexOfIndex) Returns an instance's attribute value in internal format, given an index in the sparse representation. |
double | weight() Returns the instance's weight. |