classification
Class DataValue

java.lang.Object
  extended by 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)
           
 
Method Summary
 java.lang.String getAttribute()
           
 int getInstance()
           
 java.lang.String getValue()
           
 boolean judgePrediction(Prediction p)
          Checks if a given prediction matches the data value.
static java.util.List<DataValue> readValues(java.lang.String filename)
          Read values for a Data set from a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataValue

public DataValue(int instance,
                 java.lang.String attribute,
                 java.lang.String value,
                 java.lang.Boolean unk)

DataValue

public DataValue(int instance)
Method Detail

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