static void Evaluate(Perceptron p, double from, double to, double step)
        {
            string output = "";

            for (double i = from; i < to; i += step)
            {
                double res = p.Activate(new double[] { normalize(i, inputMin, inputMax) })[0];


                output += i + ";" + inverseNormalize(res, outputMin, outputMax) + "\n";
                Console.WriteLine(i + ";" + res + "\n");
            }

            System.IO.File.WriteAllText(outputPath, output);
        }
Ejemplo n.º 2
0
        private static void Evaluate(Perceptron p, double from, double to, double step)
        {
            var output = "";

            for (var i = from; i < to; i += step)
            {
                var res = p.Activate(new double[] { Normalize(i, inputMin, inputMax) })[0];


                output += i + ";" + InverseNormalize(res, outputMin, outputMax) + "\n";
                Console.WriteLine(i + ";" + res + "\n");
            }

            File.WriteAllText(outputPath, output);
        }