7 Pds::Matrix X(Pds::Ra::TextFormat,
"../test/data_x_yinyang.txt");
8 Pds::Matrix Y(Pds::Ra::TextFormat,
"../test/data_y_yinyang.txt");
9 Pds::Matrix Ys(Y.Size());
11 Pds::FCNn NN0(
"../test/NeuralNettwork0.txt",Pds::Sigmoid,Pds::DSigmoid);
13 for(
unsigned int k=0;k<10;k++)
15 NN0.Training(X,Y,0.1,0.01);
19 std::cout<<
"Test["<<k<<
"]\t";
20 std::cout<<
"Accuracy %: " <<100.0*Pds::Accuracy(Ys.Geq(0.5),Y)<<
"\t";
21 std::cout<<
"MeanAbsError %: "<<100.0*Pds::MeanAbsoluteError(Ys,Y)<<std::endl;
24 pds_octave_plot_vector(X,Y ,
"x_1",
"x_2",
"testando.m",
"dataset_data_Y.png");
25 pds_octave_plot_vector(X,Ys,
"x_1",
"x_2",
"testando.m",
"dataset_data_Ys.png");
27 NN0.Save(
"../test/NeuralNettwork0.txt");
La clase tipo Pds::FCNn . Esta clase genera un objeto con dos parametros Nlin y Ncol....