|
||||||||||
| 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. |
MLDataPair |
get(int index)
|
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)
|
int |
size()
|
| 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 void add(MLData data1)
add in interface MLDataSetdata1 - Not used.
public void add(MLData inputData,
MLData idealData)
add in interface MLDataSetinputData - Not used.idealData - Not used.public void add(MLDataPair inputData)
add in interface MLDataSetinputData - Not used.public void close()
close in interface MLDataSetpublic void fold(int theNumFolds)
theNumFolds - The number of folds.public int getCurrentFold()
public int getCurrentFoldOffset()
public int getCurrentFoldSize()
public int getIdealSize()
getIdealSize in interface MLDataSetpublic int getInputSize()
getInputSize in interface MLDataSetpublic int getNumFolds()
public FoldedDataSet getOwner()
public 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 long getRecordCount()
getRecordCount in interface MLDataSetpublic MLDataSet getUnderlying()
public boolean isSupervised()
isSupervised in interface MLDataSetpublic Iterator<MLDataPair> iterator()
iterator in interface Iterable<MLDataPair>public MLDataSet openAdditional()
openAdditional in interface MLDataSetpublic void setCurrentFold(int theCurrentFold)
theCurrentFold - the currentFold to setpublic void setOwner(FoldedDataSet theOwner)
theOwner - The owner.public int size()
size in interface MLDataSetpublic MLDataPair get(int index)
get in interface MLDataSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||