public class Perceptron extends java.lang.Object implements FunctionApproximator
| Constructor and Description |
|---|
Perceptron(int numberOfNeurons,
int numberOfInputs) |
| Modifier and Type | Method and Description |
|---|---|
Vector |
predict(NNExample nne)
Returns the outcome predicted for the specified example
|
void |
processError(Vector error)
Accept an error and change the parameters to accommodate it
|
Vector |
processInput(Vector input)
Returns the output values for the specified input values
|
int[] |
testOnDataSet(NNDataSet nnds)
Returns the accuracy of the hypothesis on the specified set of examples
|
void |
trainOn(NNDataSet innds,
int numberofEpochs)
Induces the layer of this perceptron from the specified set of examples
|
public Vector processInput(Vector input)
FunctionApproximatorprocessInput in interface FunctionApproximatorinput - the input valuespublic void processError(Vector error)
FunctionApproximatorprocessError in interface FunctionApproximatorerror - an error vectorpublic void trainOn(NNDataSet innds, int numberofEpochs)
innds - a set of training examples for constructing the layer of this
perceptron.numberofEpochs - the number of training epochs to be used.public Vector predict(NNExample nne)
nne - an examplepublic int[] testOnDataSet(NNDataSet nnds)
nnds - the neural network data set to be tested on.