com.sun.labs.minion.classification
Class NoSplitsSplitter

java.lang.Object
  extended by com.sun.labs.minion.classification.NoSplitsSplitter
All Implemented Interfaces:
ResultSplitter

public class NoSplitsSplitter
extends java.lang.Object
implements ResultSplitter

Result Splitters split a result set into two distinct sets suitable for use in training and validation.


Constructor Summary
NoSplitsSplitter()
           
 
Method Summary
 int getMinDocs()
          Gets the minimum number of docs needed for this splitter to be useful.
 ResultSetImpl getTrainSet()
          Gets the first of the two subset
 ResultSetImpl getValidateSet()
          Gets the second of the two subsets
 void init(ResultSetImpl results, IndexConfig iC)
          Initializes the class.
 boolean nextSplit()
          Advances to the next split, if there is one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoSplitsSplitter

public NoSplitsSplitter()
Method Detail

init

public void init(ResultSetImpl results,
                 IndexConfig iC)
Description copied from interface: ResultSplitter
Initializes the class. Since implementors of ResultSplitter will be created via reflection, the default constructor is used. After instantiation, this init method is called.

Specified by:
init in interface ResultSplitter
Parameters:
results - the result set to split up
iC - the index config, possibly containing relevent settings for this splitter

getMinDocs

public int getMinDocs()
Gets the minimum number of docs needed for this splitter to be useful.

Specified by:
getMinDocs in interface ResultSplitter
Returns:
a positive integer

getTrainSet

public ResultSetImpl getTrainSet()
Gets the first of the two subset

Specified by:
getTrainSet in interface ResultSplitter
Returns:
a result set that is a subset of the one passed in

getValidateSet

public ResultSetImpl getValidateSet()
Gets the second of the two subsets

Specified by:
getValidateSet in interface ResultSplitter
Returns:
a result set that is a subset of the one passed in

nextSplit

public boolean nextSplit()
Advances to the next split, if there is one. getFirstSet() and getSecondSet() will return the new splits after this method is called

Specified by:
nextSplit in interface ResultSplitter
Returns:
true if there is another split available