org.encog.ml.data.basic
public class BasicMLDataPair extends Object implements MLDataPair, Serializable
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
public BasicMLDataPair(MLData theInput)
theInput
- The input to the machine learning method.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 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>
Copyright © 2014. All Rights Reserved.