com.sun.labs.minion.classification
Interface ResultSplitter

All Known Implementing Classes:
KFoldSplitter, NoSplitsSplitter, RandomTwoThirdsSplitter

public interface ResultSplitter

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


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.
 

Method Detail

init

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

Parameters:
results - the result set to split up
iC - the index config, possibly containing relevent settings for this splitter

getMinDocs

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

Returns:
a positive integer

getTrainSet

ResultSetImpl getTrainSet()
Gets the first of the two subset

Returns:
a result set that is a subset of the one passed in

getValidateSet

ResultSetImpl getValidateSet()
Gets the second of the two subsets

Returns:
a result set that is a subset of the one passed in

nextSplit

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

Returns:
true if there is another split available