public class GCNet
extends java.lang.Object
Wrapper for a perceptron (ConjGradNN). Also this class allows to call the desired training method of the aggregated percetron: * nntrain: for invoking Conjugated Gradient. * nntrainDG: for invoking the Descendent Gradient.
Constructor and Description |
---|
GCNet() |
Modifier and Type | Method and Description |
---|---|
java.util.Vector |
getNoisyInstances() |
double[] |
nnoutput(double[] x)
Calculated the output of present perceptron with input x and returns it in original scale.
|
double |
nntrain(int nInputs,
int nOutputs,
double[][] examples,
double[][] outputs,
int[] topology,
double[] weights,
Randomize r)
trains a perceptron with Conjugated Gradient algorithm and returns
the mean square error of neural network output compared to expected output.
|
double |
nntrainGD(int nInputs,
int nOutputs,
double[][] examples,
double[][] outputs,
int[] topology,
double[] weights,
Randomize r)
trains a perceptron with Conjugated Descendent algorithm and returns
the mean square error of neural network output compared to expected output.
|
public double nntrain(int nInputs, int nOutputs, double[][] examples, double[][] outputs, int[] topology, double[] weights, Randomize r)
trains a perceptron with Conjugated Gradient algorithm and returns the mean square error of neural network output compared to expected output.
nInputs
- number of inputs in first layernOutputs
- number of output in output layerexamples
- training examplesoutputs
- expected outputstopology
- net topology (cardinality of the hidder layers)weights
- net weightsr
- random generatorpublic java.util.Vector getNoisyInstances()
public double nntrainGD(int nInputs, int nOutputs, double[][] examples, double[][] outputs, int[] topology, double[] weights, Randomize r)
trains a perceptron with Conjugated Descendent algorithm and returns the mean square error of neural network output compared to expected output.
nInputs
- number of inputs in first layernOutputs
- number of output in output layerexamples
- training examplesoutputs
- expected outputstopology
- net topology (cardinality of the hidder layers)weights
- net weightsr
- random generatorpublic double[] nnoutput(double[] x)
x
- the inputs for feeding the perceptron.