aima.learning.framework
Class DataSet

java.lang.Object
  extended by aima.learning.framework.DataSet

public class DataSet
extends java.lang.Object


Field Summary
 java.util.List<Example> examples
           
 DataSetSpecification specification
           
 
Constructor Summary
protected DataSet()
           
  DataSet(DataSetSpecification spec)
           
 
Method Summary
 void add(Example e)
           
 double calculateGainFor(java.lang.String parameterName)
           
 DataSet copy()
           
 DataSet emptyDataSet()
           
 boolean equals(java.lang.Object o)
           
 java.util.List<java.lang.String> getAttributeNames()
           
 Example getExample(int number)
           
 double getInformationFor()
           
 java.util.List<java.lang.String> getNonTargetAttributes()
           
 java.util.List<java.lang.String> getPossibleAttributeValues(java.lang.String attributeName)
           
 java.lang.String getTargetAttributeName()
           
 int hashCode()
           
 java.util.Iterator<Example> iterator()
           
 DataSet matchingDataSet(java.lang.String attributeName, java.lang.String attributeValue)
           
 DataSet removeExample(Example e)
           
 void setSpecification(DataSetSpecification specification)
           
 int size()
           
 java.util.Hashtable<java.lang.String,DataSet> splitByAttribute(java.lang.String attributeName)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

examples

public java.util.List<Example> examples

specification

public DataSetSpecification specification
Constructor Detail

DataSet

protected DataSet()

DataSet

public DataSet(DataSetSpecification spec)
Method Detail

add

public void add(Example e)

size

public int size()

getExample

public Example getExample(int number)

removeExample

public DataSet removeExample(Example e)

getInformationFor

public double getInformationFor()

splitByAttribute

public java.util.Hashtable<java.lang.String,DataSet> splitByAttribute(java.lang.String attributeName)

calculateGainFor

public double calculateGainFor(java.lang.String parameterName)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

iterator

public java.util.Iterator<Example> iterator()

copy

public DataSet copy()

getAttributeNames

public java.util.List<java.lang.String> getAttributeNames()

getTargetAttributeName

public java.lang.String getTargetAttributeName()

emptyDataSet

public DataSet emptyDataSet()

setSpecification

public void setSpecification(DataSetSpecification specification)
Parameters:
specification - The specification to set. USE SPARINGLY for testing etc .. makes no semantic sense

getPossibleAttributeValues

public java.util.List<java.lang.String> getPossibleAttributeValues(java.lang.String attributeName)

matchingDataSet

public DataSet matchingDataSet(java.lang.String attributeName,
                               java.lang.String attributeValue)

getNonTargetAttributes

public java.util.List<java.lang.String> getNonTargetAttributes()