|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.data.folded.FoldedDataSet
public class FoldedDataSet
A folded data set allows you to "fold" the data into several equal(or nearly equal) datasets. You then have the ability to select which fold the dataset will process. This is very useful for crossvalidation. This dataset works off of an underlying dataset. By default there are no folds (fold size 1). Call the fold method to create more folds.
| Field Summary | |
|---|---|
static String |
ADD_NOT_SUPPORTED
Error message: adds are not supported. |
| Constructor Summary | |
|---|---|
FoldedDataSet(MLDataSet theUnderlying)
Create a folded dataset. |
|
| Method Summary | |
|---|---|
void |
add(MLData data1)
Not supported. |
void |
add(MLData inputData,
MLData idealData)
Not supported. |
void |
add(MLDataPair inputData)
Not supported. |
void |
close()
Close the dataset. |
void |
fold(int theNumFolds)
Fold the dataset. |
int |
getCurrentFold()
|
int |
getCurrentFoldOffset()
|
int |
getCurrentFoldSize()
|
int |
getIdealSize()
|
int |
getInputSize()
|
int |
getNumFolds()
|
FoldedDataSet |
getOwner()
|
void |
getRecord(long index,
MLDataPair pair)
Read an individual record, specified by index, in random order. |
long |
getRecordCount()
Determine the total number of records in the set. |
MLDataSet |
getUnderlying()
|
boolean |
isSupervised()
|
Iterator<MLDataPair> |
iterator()
|
MLDataSet |
openAdditional()
Opens an additional instance of this dataset. |
void |
setCurrentFold(int theCurrentFold)
Set the current fold. |
void |
setOwner(FoldedDataSet theOwner)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ADD_NOT_SUPPORTED
| Constructor Detail |
|---|
public FoldedDataSet(MLDataSet theUnderlying)
theUnderlying - The underlying folded dataset.| Method Detail |
|---|
public final void add(MLData data1)
add in interface MLDataSetdata1 - Not used.
public final void add(MLData inputData,
MLData idealData)
add in interface MLDataSetinputData - Not used.idealData - Not used.public final void add(MLDataPair inputData)
add in interface MLDataSetinputData - Not used.public final void close()
close in interface MLDataSetpublic final void fold(int theNumFolds)
theNumFolds - The number of folds.public final int getCurrentFold()
public final int getCurrentFoldOffset()
public final int getCurrentFoldSize()
public final int getIdealSize()
getIdealSize in interface MLDataSetpublic final int getInputSize()
getInputSize in interface MLDataSetpublic final int getNumFolds()
public final FoldedDataSet getOwner()
public final void getRecord(long index,
MLDataPair pair)
getRecord in interface MLDataSetindex - The index to read.pair - The pair that the record will be copied into.public final long getRecordCount()
getRecordCount in interface MLDataSetpublic final MLDataSet getUnderlying()
public final boolean isSupervised()
isSupervised in interface MLDataSetpublic final Iterator<MLDataPair> iterator()
iterator in interface Iterable<MLDataPair>public final MLDataSet openAdditional()
openAdditional in interface MLDataSetpublic final void setCurrentFold(int theCurrentFold)
theCurrentFold - the currentFold to setpublic final void setOwner(FoldedDataSet theOwner)
theOwner - The owner.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||