|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.data.basic.BasicMLDataPair
public class BasicMLDataPair
A basic implementation of the MLDataPair interface. This implementation simply holds and input and ideal MLData object. For supervised training both input and ideal should be specified. For unsupervised training the input property should be valid, however the ideal property should contain null.
Constructor Summary | |
---|---|
BasicMLDataPair(MLData theInput)
Construct the object with only input. |
|
BasicMLDataPair(MLData theInput,
MLData theIdeal)
Construct a BasicMLDataPair class with the specified input and ideal values. |
Method Summary | |
---|---|
Centroid<MLDataPair> |
createCentroid()
|
static MLDataPair |
createPair(int inputSize,
int idealSize)
Create a new data pair object of the correct size for the machine learning method that is being trained. |
MLData |
getIdeal()
|
double[] |
getIdealArray()
|
MLData |
getInput()
|
double[] |
getInputArray()
|
double |
getSignificance()
Get the significance, 1.0 is neutral. |
boolean |
isSupervised()
|
void |
setIdealArray(double[] data)
Set the ideal data, the desired output. |
void |
setInputArray(double[] data)
Set the input. |
void |
setSignificance(double significance)
Set the significance, 1.0 is neutral. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicMLDataPair(MLData theInput)
theInput
- The input to the machine learning method.public BasicMLDataPair(MLData theInput, MLData theIdeal)
theInput
- The input to the machine learning method.theIdeal
- The expected results from the machine learning method.Method Detail |
---|
public static MLDataPair createPair(int inputSize, int idealSize)
inputSize
- The size of the input data.idealSize
- The size of the ideal data.
public MLData getIdeal()
getIdeal
in interface MLDataPair
public double[] getIdealArray()
getIdealArray
in interface MLDataPair
public MLData getInput()
getInput
in interface MLDataPair
public double[] getInputArray()
getInputArray
in interface MLDataPair
public boolean isSupervised()
isSupervised
in interface MLDataPair
public void setIdealArray(double[] data)
setIdealArray
in interface MLDataPair
data
- The ideal data.public void setInputArray(double[] data)
setInputArray
in interface MLDataPair
data
- The input.public String toString()
toString
in class Object
public double getSignificance()
getSignificance
in interface MLDataPair
public void setSignificance(double significance)
setSignificance
in interface MLDataPair
significance
- The significance.public Centroid<MLDataPair> createCentroid()
createCentroid
in interface CentroidFactory<MLDataPair>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |