|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.neural.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(Indexable underlying)
Create a folded dataset. |
|
| Method Summary | |
|---|---|
void |
add(NeuralData data1)
Not supported. |
void |
add(NeuralData inputData,
NeuralData idealData)
Not supported. |
void |
add(NeuralDataPair inputData)
Not supported. |
void |
close()
Close the dataset. |
void |
fold(int numFolds)
Fold the dataset. |
int |
getCurrentFold()
|
int |
getCurrentFoldOffset()
|
int |
getCurrentFoldSize()
|
int |
getIdealSize()
|
int |
getInputSize()
|
int |
getNumFolds()
|
FoldedDataSet |
getOwner()
|
void |
getRecord(long index,
EngineData pair)
Read an individual record, specified by index, in random order. |
long |
getRecordCount()
Determine the total number of records in the set. |
Indexable |
getUnderlying()
|
boolean |
isSupervised()
|
Iterator<NeuralDataPair> |
iterator()
|
EngineIndexableSet |
openAdditional()
Opens an additional instance of this dataset. |
void |
setCurrentFold(int currentFold)
Set the current fold. |
void |
setOwner(FoldedDataSet owner)
|
| 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(Indexable underlying)
underlying - The underlying folded dataset.| Method Detail |
|---|
public void add(NeuralData data1)
add in interface NeuralDataSetdata1 - Not used.
public void add(NeuralData inputData,
NeuralData idealData)
add in interface NeuralDataSetinputData - Not used.idealData - Not used.public void add(NeuralDataPair inputData)
add in interface NeuralDataSetinputData - Not used.public void close()
close in interface NeuralDataSetpublic void fold(int numFolds)
numFolds - The number of folds.public int getCurrentFold()
public int getCurrentFoldOffset()
public int getCurrentFoldSize()
public int getIdealSize()
getIdealSize in interface EngineDataSetgetIdealSize in interface NeuralDataSetpublic int getInputSize()
getInputSize in interface EngineDataSetgetInputSize in interface NeuralDataSetpublic int getNumFolds()
public void getRecord(long index,
EngineData pair)
getRecord in interface EngineIndexableSetindex - The index to read.pair - The pair that the record will be copied into.public long getRecordCount()
getRecordCount in interface EngineIndexableSetpublic Indexable getUnderlying()
public boolean isSupervised()
isSupervised in interface EngineDataSetisSupervised in interface NeuralDataSetpublic FoldedDataSet getOwner()
public void setOwner(FoldedDataSet owner)
owner - The owner.public Iterator<NeuralDataPair> iterator()
iterator in interface Iterable<NeuralDataPair>public EngineIndexableSet openAdditional()
openAdditional in interface EngineIndexableSetpublic void setCurrentFold(int currentFold)
currentFold - the currentFold to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||