|
||||||||||
| 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 final MLData getIdeal()
getIdeal in interface MLDataPairpublic final double[] getIdealArray()
getIdealArray in interface MLDataPairpublic final MLData getInput()
getInput in interface MLDataPairpublic final double[] getInputArray()
getInputArray in interface MLDataPairpublic final boolean isSupervised()
isSupervised in interface MLDataPairpublic final void setIdealArray(double[] data)
setIdealArray in interface MLDataPairdata - The ideal data.public final void setInputArray(double[] data)
setInputArray in interface MLDataPairdata - The input.public final String toString()
toString in class Objectpublic double getSignificance()
getSignificance in interface MLDataPairpublic void setSignificance(double significance)
setSignificance in interface MLDataPairsignificance - 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 | |||||||||