|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.neural.data.csv.CSVNeuralDataSet
public class CSVNeuralDataSet
An implementation of the NeuralDataSet interface designed to provide a CSV file to the neural network. This implementation uses the BasicNeuralData to hold the data being read. This class has no ability to write CSV files. The columns of the CSV file will specify both the input and ideal columns. This class is not memory based, so very long files can be used, without running out of memory. This class can be slow, as it can take awhile to parse all of the numbers in a really long CSV file. Because of this it is best not to use this set directly with a training algorithm. Rather use it to load a BufferedNeuralDataSet.
| Nested Class Summary | |
|---|---|
class |
CSVNeuralDataSet.CSVNeuralIterator
An iterator designed to read from CSV files. |
| Field Summary | |
|---|---|
static String |
ADD_NOT_SUPPORTED
Error message indicating that adds are not supported. |
| Constructor Summary | |
|---|---|
CSVNeuralDataSet(String filename,
int inputSize,
int idealSize,
boolean headers)
Construct this data set using a comma as a delimiter. |
|
CSVNeuralDataSet(String filename,
int inputSize,
int idealSize,
boolean headers,
CSVFormat format)
Construct this data set using a comma as a delimiter. |
|
| Method Summary | |
|---|---|
void |
add(NeuralData data1)
Adds are not supported. |
void |
add(NeuralData inputData,
NeuralData idealData)
Adds are not supported. |
void |
add(NeuralDataPair inputData)
Adds are not supported. |
void |
close()
Close any iterators from this dataset. |
String |
getFilename()
|
CSVFormat |
getFormat()
|
int |
getIdealSize()
|
int |
getInputSize()
|
boolean |
isSupervised()
|
Iterator<NeuralDataPair> |
iterator()
Get an iterator to use with the CSV data. |
| 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 CSVNeuralDataSet(String filename,
int inputSize,
int idealSize,
boolean headers)
filename - The CSV filename to read.inputSize - The number of columns that make up the input set. *idealSize - The number of columns that make up the ideal set.headers - True if headers are present on the first line.
public CSVNeuralDataSet(String filename,
int inputSize,
int idealSize,
boolean headers,
CSVFormat format)
filename - The CSV filename to read.inputSize - The number of columns that make up the input set. *idealSize - The number of columns that make up the ideal set.headers - True if headers are present on the first line.format - What CSV format to use.| 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 String getFilename()
public CSVFormat getFormat()
public int getIdealSize()
getIdealSize in interface EngineDataSetgetIdealSize in interface NeuralDataSetpublic int getInputSize()
getInputSize in interface EngineDataSetgetInputSize in interface NeuralDataSetpublic Iterator<NeuralDataPair> iterator()
iterator in interface Iterable<NeuralDataPair>public boolean isSupervised()
isSupervised in interface EngineDataSetisSupervised in interface NeuralDataSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||