started moving learning algos to new namespace Machnine Learning

This commit is contained in:
2014-12-12 00:01:46 +01:00
parent 2736ede1be
commit b4bee6f498
53 changed files with 405 additions and 354 deletions

View File

@@ -1,11 +1,10 @@
#include "../src/NeuronNetwork/FeedForward"
#include "../src/NeuronNetwork/FeedForward"
#include "../src/NeuronNetwork/Learning/BackPropagation"
#include "../src/NeuralNetwork/FeedForward"
#include "../src/NeuralNetwork/Learning/BackPropagation"
#include <iostream>
#include <vector>
class X: public Shin::NeuronNetwork::Problem
class X: public Shin::Problem
{
public:
X(const X& a) :Problem(),q(a.q) {}
@@ -20,21 +19,21 @@ class X: public Shin::NeuronNetwork::Problem
int main()
{
std::vector<Shin::NeuronNetwork::Solution> s;
std::vector<Shin::Solution> s;
std::vector<X> p;
//
s.push_back(Shin::NeuronNetwork::Solution(std::vector<float>({0})));
s.push_back(Shin::Solution(std::vector<float>({0})));
p.push_back(X(std::vector<float>({1,0})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<float>({0})));
s.push_back(Shin::Solution(std::vector<float>({0})));
p.push_back(X(std::vector<float>({0,1})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<float>({0})));
s.push_back(Shin::Solution(std::vector<float>({0})));
p.push_back(X(std::vector<float>({0,0})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<float>({1})));
s.push_back(Shin::Solution(std::vector<float>({1})));
p.push_back(X(std::vector<float>({1,1})));
Shin::NeuronNetwork::FeedForward q({2,4,1});
Shin::NeuronNetwork::Learning::BackPropagation b(q);
Shin::NeuralNetwork::FeedForward q({2,4,1});
Shin::NeuralNetwork::Learning::BackPropagation b(q);
b.setLearningCoeficient(10);
for(int i=0;i<4;i++)