private static bool Load() { Console.WriteLine("What is brain´s name?"); var name = Console.ReadLine(); var exist = Brain.ActivationNetworkExists(name); if (exist) { _brain = new Brain(name); _brain.Run().Wait(); Console.WriteLine("Ok, this brain alredy exists."); } else { Console.WriteLine("Ok, this brain must learn."); //Datos de entrada dispuestos en 6 columnas, las cuatro primeras son inputs y las dos ultimas outputs DataTable table = new ExcelReader("examples.xls").GetWorksheet("Classification - Circle"); // Convert the DataTable to input and output vectors var inputs = table.ToJagged <double>("X", "Y", "X2", "Y2"); var outputs = table.ToJagged <double>("G1", "G2"); //Distribucion de las 'caja negra', capas y neuronas por capa int[] neuronsCount = new int[3] { 5, 4, 2 }; //Tolerancia, hasta que el error no sea menor a 1e-5 no se acaba el aprendizaje int tol = -5; double alpha = .5; var activationFunction = new Accord.Neuro.BipolarSigmoidFunction(); _brain = new Brain(name, inputs, outputs, neuronsCount, activationFunction, tol); Console.WriteLine("Learning..."); _brain.Run().Wait(); Console.WriteLine("I just know kung-foo"); } return(_brain != null); }