aima.learning.framework
Class DataSet
java.lang.Object
aima.learning.framework.DataSet
public class DataSet
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
examples
public java.util.List<Example> examples
specification
public DataSetSpecification specification
DataSet
protected DataSet()
DataSet
public DataSet(DataSetSpecification spec)
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()