Ejemplo n.º 1
0
        private void outputError(MultiRegressionAlgorithmBase <double[]> alg)
        {
            Console.WriteLine("Errors:");
            var errors = alg.GetErrors(GeneralUtils.ClassifiedToRegressionSample(Data.Data), 0, true);
            var ec     = errors.Count();
            var dc     = Data.Data.Count;
            var pct    = Math.Round(100.0F * ec / dc, 2);

            Console.WriteLine("{0} of {1} ({2}%)", ec, dc, pct);
        }
Ejemplo n.º 2
0
        private void doMultilayerNNAlgorithmTest()
        {
            var alg = createBPAlg();

            var now = DateTime.Now;

            alg.Train(GeneralUtils.ClassifiedToRegressionSample(Data.TrainingSample));

            Console.WriteLine("--------- ELAPSED TRAIN ----------" + (DateTime.Now - now).TotalMilliseconds);

            Console.WriteLine("Loss function: " + alg.ErrorValue);
            Console.WriteLine("Step: " + alg.Step2);

            outputError(alg);

            //Visualizer.Run(alg);
        }