classification
Class DataValue
java.lang.Object
classification.DataValue
public class DataValue
- extends java.lang.Object
This class represents a value for some attribute of a data instance
Constructor Summary |
DataValue(int instance)
|
DataValue(int instance,
java.lang.String attribute,
java.lang.String value,
java.lang.Boolean unk)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataValue
public DataValue(int instance,
java.lang.String attribute,
java.lang.String value,
java.lang.Boolean unk)
DataValue
public DataValue(int instance)
judgePrediction
public boolean judgePrediction(Prediction p)
- Checks if a given prediction matches the data value.
- Parameters:
p
- The prediction to check
- Returns:
- True if the instance, attribute, and value of the prediction match
those of the data value
getAttribute
public java.lang.String getAttribute()
getInstance
public int getInstance()
getValue
public java.lang.String getValue()
readValues
public static java.util.List<DataValue> readValues(java.lang.String filename)
throws java.io.IOException,
java.lang.NumberFormatException
- Read values for a Data set from a file.
- Parameters:
filename
- The file to read from
- Returns:
- A list containing the read values
- Throws:
java.io.IOException
java.lang.NumberFormatException