|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdata.DataPoint
public class DataPoint
Class to store an input-output pair, called a DataPoint. Both inputs and outputs can be vectors, but they have to be vectors of doubles.
| Constructor Summary | |
|---|---|
DataPoint()
Void constructor. |
|
DataPoint(int inputDimension,
int outputDimension)
Creates a new DataPoint in the given number of input and output dimensions. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
double[] |
getInput()
Returns the input. |
double |
getInput(int index)
Returns the desired component of the input |
int |
getInputDimension()
Returns the input dimension. |
cern.colt.matrix.DoubleMatrix1D |
getInputVec()
Returns the input as a DoubleMatrix1D. |
double[] |
getOutput()
Returns the output. |
double |
getOutput(int index)
Returns the desired component of the output. |
int |
getOutputDimension()
Returns the output dimension. |
cern.colt.matrix.DoubleMatrix1D |
getOutputVec()
Returns the output as a DoubleMatrix1D. |
void |
setInput(double[] input)
Sets the input. |
void |
setInput(cern.colt.matrix.DoubleMatrix1D input)
Sets the input. |
void |
setInput(int index,
double val)
Sets the specified component of the input to the given value. |
void |
setInputDimension(int inputDimension)
Sets the input dimension. |
void |
setOutput(double[] output)
Sets the output. |
void |
setOutput(cern.colt.matrix.DoubleMatrix1D output)
Sets the output. |
void |
setOutput(int index,
double val)
Sets the specified component of the output to the given value. |
void |
setOutputDimension(int outputDimension)
Sets the output dimension. |
java.lang.String |
toString()
|
void |
writeToFile(java.io.PrintWriter writer)
Writes a human-readable form of this DataPoint using the given PrintWriter. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataPoint()
public DataPoint(int inputDimension,
int outputDimension)
inputDimension - the given number of input dimensions.outputDimension - the given number of output dimensions.| Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic double[] getInput()
public double getInput(int index)
index - the index of the desired component of the input.
public int getInputDimension()
public cern.colt.matrix.DoubleMatrix1D getInputVec()
DoubleMatrix1D.
public double[] getOutput()
public double getOutput(int index)
index - the index of the desired output.
public int getOutputDimension()
public cern.colt.matrix.DoubleMatrix1D getOutputVec()
DoubleMatrix1D.
public void setInput(double[] input)
input - the given input.public void setInput(cern.colt.matrix.DoubleMatrix1D input)
input - the given input.
public void setInput(int index,
double val)
index - the index of the component to set.val - the value to set.public void setInputDimension(int inputDimension)
setInputDimension in interface VariableInputDimensioninputDimension - the given input dimension.public void setOutput(double[] output)
output - the given output.public void setOutput(cern.colt.matrix.DoubleMatrix1D output)
output - the given output.
public void setOutput(int index,
double val)
index - index of the output to set.val - the value of the output to set.public void setOutputDimension(int outputDimension)
setOutputDimension in interface VariableOutputDimensionoutputDimension - the given output dimension.public java.lang.String toString()
toString in class java.lang.Objectpublic void writeToFile(java.io.PrintWriter writer)
PrintWriter. Note: this is not designed to be used for
serialization.
writer - the given PrintWriter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||