20 #ifndef LEARNINGALGORITHM_H
21 #define LEARNINGALGORITHM_H
72 void setInputsOf(
Cluster*,
const DoubleVector& );
74 void setOutputsOf(
Cluster*,
const DoubleVector& );
76 void setInputsOutputsOf(
Cluster*,
const DoubleVector& inputs,
const DoubleVector& outputs );
78 const DoubleVector& inputsOf(
Cluster* )
const;
80 const DoubleVector& outputsOf(
Cluster* )
const;
83 PatternInfo& operator[](
Cluster* );
119 static void describe( QString type );
121 mutable QMap<Cluster*, PatternInfo> pinfo;
131 typedef QVector<Pattern> PatternSet;
148 this->neuralNetChanged();
155 virtual void learn() = 0;
157 virtual void learn(
const Pattern& ) = 0;
160 for(
int i=0; i<(int)set.size(); i++ ) {
165 virtual double calculateMSE(
const Pattern& ) = 0;
169 int dim = (int)set.size();
170 for(
int i=0; i<dim; i++ ) {
171 mseacc += calculateMSE( set[i] );
177 return sqrt( calculateMSE( p ) );
181 return sqrt( calculateMSEOnSet( p ) );
189 virtual void neuralNetChanged() = 0;
This file contains the common type defitions used on the whole framework.
double calculateRMSDOnSet(const PatternSet &p)
Calculate the Root Mean Square Deviation, i.e.
double calculateRMSD(const Pattern &p)
Calculate the Root Mean Square Deviation, i.e.
virtual double calculateMSEOnSet(const PatternSet &set)
Calculate the Mean Square Error respect to all Patterns passed.
Define the common interface among Clusters.
Pattern()
Construct an empty Pattern.
void setNeuralNet(NeuralNet *net)
Set the NeuralNet to learn.
LearningAlgorithm object.
NeuralNet * neuralNet()
Return the NeuralNet setted.
The Neural Network Class.
This file contains the declaration of Neural Network Class.
virtual void learnOnSet(const PatternSet &set)
Modify the object tring to learn all patterns present into PatternSet passed.