|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.minorthird.classify.experiments.RandomSplitter<T>
public class RandomSplitter<T>
Split into one train, one test partition. Preserves subpopulation information, if it's present.
| Constructor Summary | |
|---|---|
RandomSplitter()
|
|
RandomSplitter(double trainFraction)
|
|
RandomSplitter(java.util.Random random,
double trainFraction)
|
|
| Method Summary | |
|---|---|
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. |
double |
getTrainFraction()
|
void |
setTrainFraction(double f)
|
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 RandomSplitter(java.util.Random random,
double trainFraction)
public RandomSplitter(double trainFraction)
public RandomSplitter()
| Method Detail |
|---|
public void setTrainFraction(double f)
public double getTrainFraction()
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 | ||||||||