|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.minorthird.classify.experiments.CrossValSplitter<T>
public class CrossValSplitter<T>
Split into k separate disjoint folds, then return k train/test splits where each train set is the union of k-1 folds, and the test set is the k-th fold. Preserves subpopulation information.
| Constructor Summary | |
|---|---|
CrossValSplitter()
|
|
CrossValSplitter(int folds)
|
|
CrossValSplitter(java.util.Random random,
int folds)
|
|
| Method Summary | |
|---|---|
int |
getNumberOfFolds()
|
int |
getNumPartitions()
Return the number of partitions produced by the last call to split() |
java.util.Iterator<T> |
getTest(int k)
Return an iterator over the test cases in the k-th split. |
java.util.Iterator<T> |
getTrain(int k)
Return an iterator over the training cases in the k-th split. |
void |
setNumberOfFolds(int k)
|
void |
split(java.util.Iterator<T> 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 CrossValSplitter(java.util.Random random,
int folds)
public CrossValSplitter(int folds)
public CrossValSplitter()
| Method Detail |
|---|
public int getNumberOfFolds()
public void setNumberOfFolds(int k)
public void split(java.util.Iterator<T> i)
Splitter
split in interface Splitter<T>public int getNumPartitions()
Splitter
getNumPartitions in interface Splitter<T>public java.util.Iterator<T> getTrain(int k)
Splitter
getTrain in interface Splitter<T>public java.util.Iterator<T> getTest(int k)
Splitter
getTest in interface Splitter<T>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 | ||||||||