public class WekaInstance<L> extends ai.libs.jaicore.basic.sets.ElementDecorator<weka.core.Instance> implements INumericLabeledAttributeArrayInstance<L>
| Constructor and Description |
|---|
WekaInstance(weka.core.Instance instance) |
| Modifier and Type | Method and Description |
|---|---|
IAttributeValue<?>[] |
getAllAttributeValues() |
double[] |
getAsDoubleVector()
Turns the instance into a double vector.
|
IAttributeValue<java.lang.Double> |
getAttributeValue(int position) |
<T> IAttributeValue<T> |
getAttributeValueAtPosition(int position,
java.lang.Class<T> type)
Getter for the value of an attribute for the given position.
|
int |
getNumberOfAttributes()
Getter for the number of attributes for the instance.
|
L |
getTargetValue()
Getter for the value of the target attribute.
|
equals, getElement, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetPointpublic <T> IAttributeValue<T> getAttributeValueAtPosition(int position, java.lang.Class<T> type)
IAttributeArrayInstancegetAttributeValueAtPosition in interface IAttributeArrayInstanceposition - The position of the attribute within the instance.type - The type for which the attribute value shall be returned.public L getTargetValue()
ILabeledInstancegetTargetValue in interface ILabeledInstance<L>public double[] getAsDoubleVector()
throws ContainsNonNumericAttributesException
INumericArrayInstancegetAsDoubleVector in interface INumericArrayInstanceContainsNonNumericAttributesException - Thrown if the instance is to be converted into a double vector and still contains non-numeric attributes.public IAttributeValue<java.lang.Double> getAttributeValue(int position)
getAttributeValue in interface INumericArrayInstancepublic IAttributeValue<?>[] getAllAttributeValues()
getAllAttributeValues in interface IAttributeArrayInstancepublic int getNumberOfAttributes()
IAttributeArrayInstancegetNumberOfAttributes in interface IAttributeArrayInstance