public abstract class Example extends java.lang.Object implements java.lang.Iterable<FeatureEntry>, TestingExample
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Double |
getFeature(int featureNumber)
Gets a feature given its number
|
int |
getNumFeatures()
Gets the number of features
|
java.lang.Object |
getResult()
Gets the example result
|
java.lang.String |
toString()
Returns a string representation of the example using the LibSVM
format: result (index_A+1):value_A (index_B+1):value_B ...
|
public final java.lang.Object getResult()
public final int getNumFeatures()
TestingExample
getNumFeatures
in interface TestingExample
public final java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.Double getFeature(int featureNumber)
TestingExample
getFeature
in interface TestingExample
featureNumber
- index of the feature