|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbodhidharma.classifiers.feedforward_neural_networks.LinkedNodes
public class LinkedNodes
Objects of this class represent complete backprop neural networks. LinkedNodes objects link the node objects together and allow them to interact with one another. LinkedNodes objects are controlled by FeedForwardNeuralNetwork objects. Adjustable learning rates and momentums are permitted. An arbitrary number of input nodes, hidden nodes and output nodes are permitted.
Only allows perceptrons or neural networks with one layer of hidden nodes. Only limited error checking is implemented. It is assumed that correct input is passed to the methods.
Constructor Summary | |
---|---|
LinkedNodes(double learning_rate,
double momentum,
int inputs,
int hidden,
int outputs,
double[] weights)
Use this constructor when loading a pre-existing network. |
|
LinkedNodes(double learning_rate,
double momentum,
int inputs,
int hidden,
int outputs,
double min_w,
double max_w)
Use this constructor when generating a network from scratch. |
Method Summary | |
---|---|
double |
get_error(double[] sample_input,
double[] corresponding_output)
Returns the sum-of-squared-error for given data set |
double[] |
get_output(double[] input_values)
Returns the array of values output at the output nodes corresponding to input_values |
java.lang.String |
get_weight_string()
Returns a string contating a vertical list of learning rate, momentum, number of input nodes, number of hidden nodes, number of output nodes and all weights (hidden nodes followed by output nodes). |
java.lang.String |
getHiddenNodesCount()
Return the number of hidden nodes |
java.lang.String |
getLearningRate()
Return the learning rate |
double |
getLearningRateValue()
Returns the learning rate used by the network |
java.lang.String |
getMomentum()
Return the momentum |
double |
getMomentumValue()
Returns the momentum used by the network |
int |
getNumberOfHiddenUnits()
Returns the number of hidden units in the network |
int |
getNumberOfInputUnits()
Returns the number of input units in the network |
int |
getNumberOfOutputUnits()
Returns the number of output units in the network |
double[] |
getWeights()
Returns the weights of all of the links in the network, starting with the hidden nodes and movin on to the output nodes. |
java.lang.String |
print_network()
Returns a string containting the current inputs, weights and values of the network nodes. |
double |
training_iteration(double[] input_values,
double[] desired_values)
Goes through one iteration of training to update all weights once, given the desired output values for the given input_values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkedNodes(double learning_rate, double momentum, int inputs, int hidden, int outputs, double min_w, double max_w)
learning_rate
- The learning rate neural network parameter used during training.momentum
- The momentum neural network parameter used during training.inputs
- The number of input nodes.hidden
- The number of hidden nodes.outputs
- The number of output nodes.min_w
- The minimum possible value for the randomly generated initial weights.max_w
- The maximum possible value for the randomly generated initial weights.public LinkedNodes(double learning_rate, double momentum, int inputs, int hidden, int outputs, double[] weights)
learning_rate
- The learning rate neural network parameter used during training.momentum
- The momentum neural network parameter used during training.inputs
- The number of input nodes.hidden
- The number of hidden nodes.outputs
- The number of output nodes.weights
- Contains the weights of the hidden nodes (if any) followed by those of the output nodes.Method Detail |
---|
public double[] get_output(double[] input_values)
public double training_iteration(double[] input_values, double[] desired_values)
public double get_error(double[] sample_input, double[] corresponding_output)
public double getLearningRateValue()
public double getMomentumValue()
public int getNumberOfInputUnits()
public int getNumberOfHiddenUnits()
public int getNumberOfOutputUnits()
public double[] getWeights()
public java.lang.String print_network()
public java.lang.String get_weight_string()
public java.lang.String getLearningRate()
public java.lang.String getMomentum()
public java.lang.String getHiddenNodesCount()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |