edu.cmu.minorthird.classify.experiments
Class StrataSorter

java.lang.Object
  extended by edu.cmu.minorthird.classify.experiments.StrataSorter

public class StrataSorter
extends java.lang.Object

Helper class for splitting up iterators over Examples, by class.

Author:
Edoardo Airoldi Date: Dec 8, 2003

Constructor Summary
StrataSorter(java.util.Iterator<Example> i)
          Create a StrataSorter.
StrataSorter(java.util.Random random, java.util.Iterator<Example> i)
          Create a StrataSorter.
 
Method Summary
 java.util.Iterator<java.util.List<Example>> strataIterator()
          Return an iterator over lists of strata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrataSorter

public StrataSorter(java.util.Random random,
                    java.util.Iterator<Example> i)
Create a StrataSorter. Iterator i must iterate over Examples.


StrataSorter

public StrataSorter(java.util.Iterator<Example> i)
Create a StrataSorter. Iterator i must iterate over Examples.

Method Detail

strataIterator

public java.util.Iterator<java.util.List<Example>> strataIterator()
Return an iterator over lists of strata. The strata, and the lists of Instances within each stratus, are randomly ordered.