edu.washington.cs.knowitall.extractor.conf
Class WekaDataSet<T>

java.lang.Object
  extended by edu.washington.cs.knowitall.extractor.conf.WekaDataSet<T>
Type Parameters:
T -

public class WekaDataSet<T>
extends java.lang.Object

A wrapper for the Weka Instances class. This class allows the caller to add instances to a data set by directly passing an object of type T and a label. The object is then featurized using a BooleanFeatureSet and added to a Weka Instances object.

Author:
afader

Constructor Summary
WekaDataSet(java.lang.String name, BooleanFeatureSet<T> featureSet)
          Constructs a new data set
 
Method Summary
 void addInstance(T object)
          Adds a new unlabeled instance to the data set with the given label (0 for negative, 1 for positive).
 void addInstance(T object, int label)
          Adds a new instance to the data set with the given label (0 for negative, 1 for positive).
 weka.core.Instances getWekaInstances()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WekaDataSet

public WekaDataSet(java.lang.String name,
                   BooleanFeatureSet<T> featureSet)
Constructs a new data set

Parameters:
name - the name of the data set
featureSet - the feature representation of the data set
Method Detail

addInstance

public void addInstance(T object,
                        int label)
Adds a new instance to the data set with the given label (0 for negative, 1 for positive).

Parameters:
object -
label -

addInstance

public void addInstance(T object)
Adds a new unlabeled instance to the data set with the given label (0 for negative, 1 for positive).

Parameters:
object -

getWekaInstances

public weka.core.Instances getWekaInstances()
Returns:
the underlying Weka Instances object