|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neuroph.core.learning.DataSet
public class DataSet
A set of training elements for training neural network.
Constructor Summary | |
---|---|
DataSet(int inputSize)
Creates an instance of new empty training set |
|
DataSet(int inputVectorSize,
int outputVectorSize)
Creates an instance of new empty training set |
Method Summary | |
---|---|
void |
addRow(DataSetRow row)
Adds new row element to this data set |
void |
addRow(double[] input)
|
void |
addRow(double[] input,
double[] output)
|
void |
clear()
Removes all alements from training set |
static DataSet |
createFromFile(String filePath,
int inputsCount,
int outputsCount,
String delimiter)
|
DataSet[] |
createTrainingAndTestSubsets(int trainSetPercent,
int testSetPercent)
Returns output vector size of training elements in this training set This method is implementation of EngineIndexableSet interface, and it is added to provide compatibility with Encog data sets and FlatNetwork |
String[] |
getColumnNames()
|
String |
getFilePath()
Returns full file path for this training set |
int |
getInputSize()
Returns input vector size of training elements in this training set This method is implementation of EngineIndexableSet interface, and it is added to provide compatibility with Encog data sets and FlatNetwork |
String |
getLabel()
Returns label for this training set |
int |
getOutputSize()
Returns output vector size of training elements in this training set. |
DataSetRow |
getRowAt(int idx)
Returns training element at specified index position |
List<DataSetRow> |
getRows()
Returns elements of this training set |
boolean |
isEmpty()
Returns true if training set is empty, false otherwise |
Iterator |
iterator()
Returns Iterator for iterating training elements collection |
static DataSet |
load(String filePath)
Loads training set from the specified file |
void |
normalize()
|
void |
normalize(Normalizer normalizer)
|
void |
removeRowAt(int idx)
Removes training element at specified index position |
void |
save()
Saves this training set to file specified in its filePath field |
void |
save(String filePath)
Saves this training set to the specified file |
void |
saveAsTxt(String filePath,
String delimiter)
|
void |
setColumnNames(String[] columnNames)
|
void |
setFilePath(String filePath)
Sets full file path for this training set |
void |
setLabel(String label)
Sets label for this training set |
void |
shuffle()
|
int |
size()
Returns number of training elements in this training set set |
String |
toString()
Returns label of this training set |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataSet(int inputSize)
inputVectorSize
- public DataSet(int inputVectorSize, int outputVectorSize)
inputVectorSize
- outputVectorSize
- Method Detail |
---|
public void addRow(DataSetRow row) throws VectorSizeMismatchException
row
- data set row to add
VectorSizeMismatchException
public void addRow(double[] input)
public void addRow(double[] input, double[] output)
public void removeRowAt(int idx)
idx
- position of element to removepublic Iterator iterator()
public List<DataSetRow> getRows()
public DataSetRow getRowAt(int idx)
idx
- index position of training element to return
public void clear()
public boolean isEmpty()
public int size()
public String getLabel()
public void setLabel(String label)
label
- label for this training setpublic String[] getColumnNames()
public void setColumnNames(String[] columnNames)
public void setFilePath(String filePath)
filePath
- public String getFilePath()
public String toString()
toString
in class Object
public void save(String filePath)
filePath
- public void save()
public void saveAsTxt(String filePath, String delimiter)
public static DataSet load(String filePath)
filePath
- training set file
public static DataSet createFromFile(String filePath, int inputsCount, int outputsCount, String delimiter)
public void normalize()
public void normalize(Normalizer normalizer)
public DataSet[] createTrainingAndTestSubsets(int trainSetPercent, int testSetPercent)
public int getOutputSize()
public int getInputSize()
public void shuffle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |