openModeller
Version 1.4.0
|
#include <nn.h>
Public Member Functions | |
Network () | |
int | SetData (double learning_rate, int layers[], int tot_layers) |
void | SetInputs (vector< double > inputs) const |
void | RandomizeWB (void) |
double * | GetOutput (void) const |
double | getWeight (int i, int j, int k) const |
void | setWeight (int i, int j, int k, double w) |
double | getBias (int i, int j) const |
void | setBias (int i, int j, double b) |
void | Update (void) |
double | Limiter (double value) const |
double | GetRand (void) |
double | SigmaWeightDelta (unsigned long layer_no, unsigned long neuron_no) |
void | setError (int max_pattern) |
void | addError (int max_pattern) |
int | Train (vector< double > inputs, vector< double > outputs, int number_pattern, int max_pattern, double momentum) |
void | trainingEpoch (unsigned long actual_epoch, double epoch_total, int patterns) |
int | trainingMinimumError (int patterns, double min_error) |
float | getProgress () |
~Network () | |
Public Attributes | |
double | net_learning_rate |
Layer * | Layers |
int | net_tot_layers |
double * | net_inputs |
double * | net_outputs |
int * | net_layers |
double * | square_error |
double * | mean_square_error |
float | progress |
Network::Network | ( | ) | [inline] |
Network::~Network | ( | ) | [inline] |
void Network::addError | ( | int | max_pattern | ) | [inline] |
Definition at line 397 of file nn.h.
References mean_square_error, and square_error.
Referenced by Train().
double Network::getBias | ( | int | i, |
int | j | ||
) | const [inline] |
Definition at line 293 of file nn.h.
References Layers, Neuron::n_bias, and Layer::Neurons.
Referenced by NNAlgorithm::_getConfiguration().
double* Network::GetOutput | ( | void | ) | const [inline] |
Definition at line 243 of file nn.h.
References Dendrite::d_weight, Neuron::Dendrites, Layers, Limiter(), Neuron::n_bias, Neuron::n_value, net_layers, net_tot_layers, and Layer::Neurons.
Referenced by NNAlgorithm::getValue(), and Update().
float Network::getProgress | ( | ) | [inline] |
double Network::GetRand | ( | void | ) | [inline] |
Definition at line 331 of file nn.h.
References RANDOM_CLAMP, and RANDOM_NUM.
Referenced by RandomizeWB().
double Network::getWeight | ( | int | i, |
int | j, | ||
int | k | ||
) | const [inline] |
Definition at line 280 of file nn.h.
References Dendrite::d_weight, Neuron::Dendrites, Layers, and Layer::Neurons.
Referenced by NNAlgorithm::_getConfiguration().
double Network::Limiter | ( | double | value | ) | const [inline] |
Definition at line 324 of file nn.h.
Referenced by GetOutput().
void Network::RandomizeWB | ( | void | ) | [inline] |
Definition at line 213 of file nn.h.
References Dendrite::d_weight, Dendrite::d_weight_actual, Dendrite::d_weight_ancient, Neuron::Dendrites, GetRand(), Layers, Neuron::n_bias, net_layers, net_tot_layers, Layer::Neurons, and Neuron::SetDendrites().
Referenced by NNAlgorithm::_setConfiguration(), and NNAlgorithm::initialize().
void Network::setBias | ( | int | i, |
int | j, | ||
double | b | ||
) | [inline] |
Definition at line 299 of file nn.h.
References Layers, Neuron::n_bias, and Layer::Neurons.
Referenced by NNAlgorithm::_setConfiguration().
int Network::SetData | ( | double | learning_rate, |
int | layers[], | ||
int | tot_layers | ||
) | [inline] |
Definition at line 173 of file nn.h.
References Layer::Initialize(), Layers, net_inputs, net_layers, net_learning_rate, net_outputs, and net_tot_layers.
Referenced by NNAlgorithm::_setConfiguration(), and NNAlgorithm::initialize().
void Network::setError | ( | int | max_pattern | ) | [inline] |
Definition at line 383 of file nn.h.
References mean_square_error, and square_error.
Referenced by Train().
void Network::SetInputs | ( | vector< double > | inputs | ) | const [inline] |
Definition at line 204 of file nn.h.
References Layers, Neuron::n_value, net_layers, and Layer::Neurons.
Referenced by NNAlgorithm::getValue(), and Train().
void Network::setWeight | ( | int | i, |
int | j, | ||
int | k, | ||
double | w | ||
) | [inline] |
Definition at line 286 of file nn.h.
References Dendrite::d_weight, Neuron::Dendrites, Layers, and Layer::Neurons.
Referenced by NNAlgorithm::_setConfiguration().
double Network::SigmaWeightDelta | ( | unsigned long | layer_no, |
unsigned long | neuron_no | ||
) | [inline] |
Definition at line 357 of file nn.h.
References Dendrite::d_weight, Neuron::Dendrites, Layers, Neuron::n_delta, net_layers, and Layer::Neurons.
Referenced by Train().
int Network::Train | ( | vector< double > | inputs, |
vector< double > | outputs, | ||
int | number_pattern, | ||
int | max_pattern, | ||
double | momentum | ||
) | [inline] |
Definition at line 408 of file nn.h.
References addError(), Dendrite::d_weight, Dendrite::d_weight_actual, Dendrite::d_weight_ancient, Neuron::Dendrites, error, Layers, Neuron::n_bias, Neuron::n_delta, Neuron::n_value, net_layers, net_learning_rate, net_tot_layers, Layer::Neurons, setError(), SetInputs(), SigmaWeightDelta(), square_error, and Update().
Referenced by NNAlgorithm::iterate().
void Network::trainingEpoch | ( | unsigned long | actual_epoch, |
double | epoch_total, | ||
int | patterns | ||
) | [inline] |
Definition at line 504 of file nn.h.
References mean_square_error, and progress.
Referenced by NNAlgorithm::iterate().
int Network::trainingMinimumError | ( | int | patterns, |
double | min_error | ||
) | [inline] |
Definition at line 516 of file nn.h.
References mean_square_error, and progress.
Referenced by NNAlgorithm::iterate().
void Network::Update | ( | void | ) | [inline] |
Definition at line 306 of file nn.h.
References GetOutput().
Referenced by Train().
Definition at line 156 of file nn.h.
Referenced by getBias(), GetOutput(), getWeight(), RandomizeWB(), setBias(), SetData(), SetInputs(), setWeight(), SigmaWeightDelta(), and Train().
double* Network::mean_square_error |
Definition at line 164 of file nn.h.
Referenced by addError(), setError(), trainingEpoch(), and trainingMinimumError().
double* Network::net_inputs |
int* Network::net_layers |
Definition at line 160 of file nn.h.
Referenced by GetOutput(), RandomizeWB(), SetData(), SetInputs(), SigmaWeightDelta(), and Train().
double Network::net_learning_rate |
double* Network::net_outputs |
Definition at line 157 of file nn.h.
Referenced by GetOutput(), RandomizeWB(), SetData(), and Train().
float Network::progress |
Definition at line 166 of file nn.h.
Referenced by getProgress(), trainingEpoch(), and trainingMinimumError().
double* Network::square_error |
Definition at line 163 of file nn.h.
Referenced by addError(), setError(), and Train().