perceptron implementation changed + perceptronLearningAlgorithm and tests
This commit is contained in:
@@ -3,19 +3,18 @@
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
#include <NeuralNetwork/FeedForward/Network.h>
|
||||
#include "CorrectionFunction/Linear.h"
|
||||
#include <NeuralNetwork/FeedForward/Perceptron.h>
|
||||
|
||||
namespace NeuralNetwork {
|
||||
namespace Learning {
|
||||
|
||||
/** @class BackPropagation
|
||||
* @brief
|
||||
/** @class PerceptronLearning
|
||||
* @brief Basic algorithm for learning Perceptron
|
||||
*/
|
||||
class PerceptronLearning {
|
||||
|
||||
public:
|
||||
inline PerceptronLearning(FeedForward::Network &feedForwardNetwork): network(feedForwardNetwork), learningCoefficient(0.4) {
|
||||
inline PerceptronLearning(FeedForward::Perceptron &perceptronNetwork): perceptron(perceptronNetwork), learningCoefficient(0.1) {
|
||||
}
|
||||
|
||||
virtual ~PerceptronLearning() {
|
||||
@@ -30,7 +29,7 @@ namespace NeuralNetwork {
|
||||
|
||||
protected:
|
||||
|
||||
FeedForward::Network &network;
|
||||
FeedForward::Perceptron &perceptron;
|
||||
|
||||
float learningCoefficient;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user