jhpro.nnet.jknnl
Class LearningData
- java.lang.Object
-
- jhpro.nnet.jknnl.LearningData
-
- All Implemented Interfaces:
- LearningDataModel
public class LearningData extends java.lang.Object implements LearningDataModel
Object containing learning data. Data are stored as array with double values.
-
-
Constructor Summary
Constructors Constructor and Description LearningData(java.util.ArrayList<double[]> dataList)Creates a new instance of LearningData.LearningData(PND array2D)Creates a new instance of LearningData.LearningData(java.lang.String fileName)Creates a new instance of LearningData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]getData(int index)Return ArrayList as vector of dataintgetDataSize()Return numbers of dataintgetVectorSize()Return length of the vectorjava.lang.StringtoString()Return a string representation of the data.
-
-
-
Constructor Detail
-
LearningData
public LearningData(java.lang.String fileName)
Creates a new instance of LearningData. Import data from file.- Parameters:
fileName- path to the file with data
-
LearningData
public LearningData(PND array2D)
Creates a new instance of LearningData. Import data from PND.- Parameters:
array2D- list of values
-
LearningData
public LearningData(java.util.ArrayList<double[]> dataList)
Creates a new instance of LearningData. Import data from array.- Parameters:
dataList- list of values
-
-
Method Detail
-
getData
public double[] getData(int index)
Return ArrayList as vector of data- Specified by:
getDatain interfaceLearningDataModel- Parameters:
index- index of data- Returns:
- data vector
-
toString
public java.lang.String toString()
Return a string representation of the data. [value, value, ... ]- Specified by:
toStringin interfaceLearningDataModel- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation of the data
-
getDataSize
public int getDataSize()
Return numbers of data- Specified by:
getDataSizein interfaceLearningDataModel- Returns:
- numbers of data
-
getVectorSize
public int getVectorSize()
Return length of the vector- Returns:
- Return length of the vector
-
-
DMelt 3.0 © DataMelt by jWork.ORG