started moving learning algos to new namespace Machnine Learning
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#include "../src/NeuronNetwork/FeedForward"
|
||||
#include "../src/NeuronNetwork/Learning/OpticalBackPropagation"
|
||||
#include "../src/NeuralNetwork/FeedForward"
|
||||
#include "../src/NeuralNetwork/Learning/OpticalBackPropagation"
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
class X: public Shin::NeuronNetwork::Problem
|
||||
class X: public Shin::Problem
|
||||
{
|
||||
public:
|
||||
X(const X& a) :Problem(a) {}
|
||||
@@ -16,15 +16,15 @@ int main()
|
||||
srand(time(NULL));
|
||||
for (int test=0;test<2;test++)
|
||||
{
|
||||
Shin::NeuronNetwork::FeedForward q({2,40,1});
|
||||
Shin::NeuronNetwork::Learning::OpticalBackPropagation b(q);
|
||||
Shin::NeuralNetwork::FeedForward q({2,40,1});
|
||||
Shin::NeuralNetwork::Learning::OpticalBackPropagation b(q);
|
||||
b.setLearningCoeficient(0.1);
|
||||
|
||||
std::vector<std::pair<Shin::NeuronNetwork::Problem, Shin::NeuronNetwork::Solution> > set;
|
||||
set.push_back(std::pair<Shin::NeuronNetwork::Problem, Shin::NeuronNetwork::Solution>(Shin::NeuronNetwork::Problem({0,0}),Shin::NeuronNetwork::Solution({0})));
|
||||
set.push_back(std::pair<Shin::NeuronNetwork::Problem, Shin::NeuronNetwork::Solution>(Shin::NeuronNetwork::Problem({1,0}),Shin::NeuronNetwork::Solution({1})));
|
||||
set.push_back(std::pair<Shin::NeuronNetwork::Problem, Shin::NeuronNetwork::Solution>(Shin::NeuronNetwork::Problem({1,1}),Shin::NeuronNetwork::Solution({0})));
|
||||
set.push_back(std::pair<Shin::NeuronNetwork::Problem, Shin::NeuronNetwork::Solution>(Shin::NeuronNetwork::Problem({0,1}),Shin::NeuronNetwork::Solution({1})));
|
||||
std::vector<std::pair<Shin::Problem, Shin::Solution> > set;
|
||||
set.push_back(std::pair<Shin::Problem, Shin::Solution>(Shin::Problem({0,0}),Shin::Solution({0})));
|
||||
set.push_back(std::pair<Shin::Problem, Shin::Solution>(Shin::Problem({1,0}),Shin::Solution({1})));
|
||||
set.push_back(std::pair<Shin::Problem, Shin::Solution>(Shin::Problem({1,1}),Shin::Solution({0})));
|
||||
set.push_back(std::pair<Shin::Problem, Shin::Solution>(Shin::Problem({0,1}),Shin::Solution({1})));
|
||||
if(test)
|
||||
{
|
||||
std::cerr << "Testing with entropy\n";
|
||||
|
||||
Reference in New Issue
Block a user