edu.cmu.minorthird.classify
Interface Dataset

All Superinterfaces:
Visible
All Known Implementing Classes:
BasicDataset, CoreRelationalDataset, MultiDataset, RandomAccessDataset, RealRelationalDataset, SegmentDataset, SemiSupervisedDataset, SequenceDataset

public interface Dataset
extends Visible

A set of examples for learning.

Author:
William Cohen

Nested Class Summary
static interface Dataset.Split
          A partitioning of the dataset into a number of train/test partitions
 
Method Summary
 void add(Example example)
          Add a new example to the dataset.
 void add(Example example, boolean compress)
          Add a new example to the dataset.
 FeatureFactory getFeatureFactory()
          Get the FeatureFactory associated with the dataset
 ExampleSchema getSchema()
          Get the schema associated with the dataset
 java.util.Iterator<Example> iterator()
          Return an iterator over all examples.
 Dataset shallowCopy()
          Make a shallow copy of the dataset.
 void shuffle()
          Randomly re-order the examples.
 void shuffle(java.util.Random r)
          Randomly re-order the examples.
 int size()
          Return the number of examples.
 Dataset.Split split(Splitter<Example> splitter)
          Partition the dataset as required by the splitter.
 
Methods inherited from interface edu.cmu.minorthird.util.gui.Visible
toGUI
 

Method Detail

getFeatureFactory

FeatureFactory getFeatureFactory()
Get the FeatureFactory associated with the dataset


getSchema

ExampleSchema getSchema()
Get the schema associated with the dataset


add

void add(Example example)
Add a new example to the dataset.


add

void add(Example example,
         boolean compress)
Add a new example to the dataset. Specifying whether or not to compress it.


iterator

java.util.Iterator<Example> iterator()
Return an iterator over all examples. This iterator must always return examples in the order in which they were added, unless the data has been shuffled.


size

int size()
Return the number of examples.


shuffle

void shuffle(java.util.Random r)
Randomly re-order the examples.


shuffle

void shuffle()
Randomly re-order the examples.


shallowCopy

Dataset shallowCopy()
Make a shallow copy of the dataset. Examples are shared, but not the ordering of the examples.


split

Dataset.Split split(Splitter<Example> splitter)
Partition the dataset as required by the splitter.