Java weka.core Instance fields, constructors, methods, implement or subclass

Example usage for Java weka.core Instance fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for weka.core Instance.

The text is from its open source code.

Subclass

weka.core.Instance has subclasses.
Click this link to see all its subclasses.

Implementation

weka.core.Instance has the following implementations.
Click this link to see all its implementation.

Method

Attributeattribute(int index)
Returns the attribute with the given index.
AttributeattributeSparse(int indexOfIndex)
Returns the attribute with the given index in the sparse representation.
AttributeclassAttribute()
Returns class attribute.
intclassIndex()
Returns the class attribute's index.
booleanclassIsMissing()
Tests if an instance's class is missing.
doubleclassValue()
Returns an instance's class value as a floating-point number.
Objectcopy()
This method produces a shallow copy of an object.
Instancecopy(double[] values)
Copies the instance but fills up its values based on the given array of doubles.
Instancesdataset()
Returns the dataset this instance has access to.
voiddeleteAttributeAt(int position)
Deletes an attribute at the given position (0 to numAttributes() - 1).
EnumerationenumerateAttributes()
Returns an enumeration of all the attributes.
booleanhasMissingValue()
Tests whether an instance has a missing value.
intindex(int position)
Returns the index of the attribute stored at the given position in the sparse representation.
voidinsertAttributeAt(int position)
Inserts an attribute at the given position (0 to numAttributes()).
booleanisMissing(int attIndex)
Tests if a specific value is "missing".
booleanisMissing(Attribute att)
Tests if a specific value is "missing".
booleanisMissingSparse(int indexOfIndex)
Tests if a specific value is "missing" in the sparse representation.
intnumAttributes()
Returns the number of attributes.
intnumClasses()
Returns the number of class labels.
intnumValues()
Returns the number of values present in a sparse representation.
InstancesrelationalValue(int attIndex)
Returns the relational value of a relational attribute.
InstancesrelationalValue(Attribute att)
Returns the relational value of a relational attribute.
voidreplaceMissingValues(double[] array)
Replaces all missing values in the instance with the values contained in the given array.
voidsetClassMissing()
Sets the class value of an instance to be "missing".
voidsetClassValue(double value)
Sets the class value of an instance to the given value (internal floating-point format).
voidsetClassValue(String value)
Sets the class value of an instance to the given value.
voidsetDataset(Instances instances)
Sets the reference to the dataset.
voidsetMissing(int attIndex)
Sets a specific value to be "missing".
voidsetMissing(Attribute att)
Sets a specific value to be "missing".
voidsetValue(int attIndex, double value)
Sets a specific value in the instance to the given value (internal floating-point format).
voidsetValue(int attIndex, String value)
Sets a value of a nominal or string attribute to the given value.
voidsetValue(Attribute att, double value)
Sets a specific value in the instance to the given value (internal floating-point format).
voidsetValue(Attribute att, String value)
Sets a value of an nominal or string attribute to the given value.
voidsetValueSparse(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.
voidsetWeight(double weight)
Sets the weight of an instance.
StringstringValue(int attIndex)
Returns the value of a nominal, string, date, or relational attribute for the instance as a string.
StringstringValue(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.
StringtoString(int attIndex)
Returns the description of one value of the instance as a string.
StringtoString(Attribute att)
Returns the description of one value of the instance as a string.
doublevalue(int attIndex)
Returns an instance's attribute value in internal format.
doublevalue(Attribute att)
Returns an instance's attribute value in internal format.
doublevalueSparse(int indexOfIndex)
Returns an instance's attribute value in internal format, given an index in the sparse representation.
doubleweight()
Returns the instance's weight.