com.sjm.machlearn.dataset
Class Example

java.lang.Object
  |
  +--com.sjm.machlearn.util.MainClass
        |
        +--com.sjm.machlearn.dataset.Example

public class Example
extends MainClass


Field Summary
protected  Feature[] data
           
protected  FeatureIdList idlist
           
protected  double weight
           
 
Fields inherited from class com.sjm.machlearn.util.MainClass
debug, debug_level, debug_listeners
 
Constructor Summary
Example(Feature[] features)
           
Example(FeatureIdList fidl)
           
Example(FeatureIdList fidl, boolean debug)
           
Example(FeatureIdList fidl, java.lang.String dataline)
           
 
Method Summary
 boolean correctOutput(Feature testfeature)
           
 Feature get(int id)
           
 Feature getFeature(FeatureId id)
           
 Feature getFeature(int id)
           
 FeatureIdList getIdList()
           
 Feature getOutputFeature()
           
 FeatureId getOutputFeatureId()
           
 int getOutputIndex()
           
 double getWeight()
           
 int numFeatures()
           
 void parseData(java.lang.String dataline)
           
 java.lang.String printExample()
           
 void setWeight(double wgt)
           
 int size()
           
 
Methods inherited from class com.sjm.machlearn.util.MainClass
_internalError, _internalError, addDebugListener, debugMesg, debugMesg, debugMesg, debugMesg, debugMesg, debugMesg, debugOff, debugOn, internalError, internalError, setDebug, setDebugLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idlist

protected FeatureIdList idlist

data

protected Feature[] data

weight

protected double weight
Constructor Detail

Example

public Example(FeatureIdList fidl,
               boolean debug)

Example

public Example(FeatureIdList fidl)

Example

public Example(FeatureIdList fidl,
               java.lang.String dataline)
        throws InvalidFeature,
               MissingFeatureValueException

Example

public Example(Feature[] features)
        throws MultipleOutputException,
               NoOutputException
Method Detail

getIdList

public FeatureIdList getIdList()

getWeight

public double getWeight()

setWeight

public void setWeight(double wgt)

size

public int size()

numFeatures

public int numFeatures()

getFeature

public Feature getFeature(int id)

getFeature

public Feature getFeature(FeatureId id)
                   throws MissingFeatureException

get

public Feature get(int id)

getOutputIndex

public int getOutputIndex()

getOutputFeature

public Feature getOutputFeature()

getOutputFeatureId

public FeatureId getOutputFeatureId()

printExample

public java.lang.String printExample()

correctOutput

public boolean correctOutput(Feature testfeature)

parseData

public void parseData(java.lang.String dataline)
               throws InvalidFeature,
                      MissingFeatureValueException