|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.classification.RandomTwoThirdsSplitter
public class RandomTwoThirdsSplitter
Provides two thirds/one third splits of a result set by selecting documents at random to place in either set.
| Nested Class Summary | |
|---|---|
class |
RandomTwoThirdsSplitter.Doc
|
| Field Summary | |
|---|---|
protected RandomTwoThirdsSplitter.Doc[] |
allDocs
|
protected int |
numArrayGroups
The number of array groups in the result set |
protected int |
numSplits
The number of times to split |
protected ResultSetImpl |
parent
The full results, as passed in |
protected ResultSetImpl |
train
The set that should be trained on |
protected ResultSetImpl |
validate
The set that should be used for validation |
| Constructor Summary | |
|---|---|
RandomTwoThirdsSplitter()
Default constructor. |
|
| 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 parent,
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 |
| Field Detail |
|---|
protected int numSplits
protected ResultSetImpl train
protected ResultSetImpl validate
protected ResultSetImpl parent
protected int numArrayGroups
protected RandomTwoThirdsSplitter.Doc[] allDocs
| Constructor Detail |
|---|
public RandomTwoThirdsSplitter()
| Method Detail |
|---|
public void init(ResultSetImpl parent,
IndexConfig iC)
ResultSplitter
init in interface ResultSplitterparent - the result set to split upiC - the index config, possibly containing relevent settings for this splitterpublic int getMinDocs()
getMinDocs in interface ResultSplitterpublic ResultSetImpl getTrainSet()
getTrainSet in interface ResultSplitterpublic ResultSetImpl getValidateSet()
getValidateSet in interface ResultSplitterpublic boolean nextSplit()
nextSplit in interface ResultSplitter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||