|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.minorthird.classify.experiments.StratifiedCrossValSplitter
public class StratifiedCrossValSplitter
Works with datasets of binary examples. Splits POS and NEG examples into k separate disjoints folds, separately, and then returns k train/test splits where each train set is the union of k-1 folds, and the test set is the k-th fold. Does NOT preserve subpopulation information.
| Constructor Summary | |
|---|---|
StratifiedCrossValSplitter()
|
|
StratifiedCrossValSplitter(int folds)
|
|
StratifiedCrossValSplitter(java.util.Random random,
int folds)
|
|
| Method Summary | |
|---|---|
int |
getNumPartitions()
Return the number of partitions produced by the last call to split() |
java.util.Iterator<Example> |
getTest(int k)
Return an iterator over the test cases in the k-th split. |
java.util.Iterator<Example> |
getTrain(int k)
Return an iterator over the training cases in the k-th split. |
void |
split(java.util.Iterator<Example> i)
Split the iterator into a number of train/test partitions. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StratifiedCrossValSplitter(java.util.Random random,
int folds)
public StratifiedCrossValSplitter(int folds)
public StratifiedCrossValSplitter()
| Method Detail |
|---|
public void split(java.util.Iterator<Example> i)
Splitter
split in interface Splitter<Example>public int getNumPartitions()
Splitter
getNumPartitions in interface Splitter<Example>public java.util.Iterator<Example> getTrain(int k)
Splitter
getTrain in interface Splitter<Example>public java.util.Iterator<Example> getTest(int k)
Splitter
getTest in interface Splitter<Example>public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||