예제 #1
0
        public double CalculateError(double[][] data)
        {
            BestMatchingUnit bmu = new BestMatchingUnit(this);

            bmu.Reset();

            // Determine the BMU for each training element.
            foreach (double[] pair in data)
            {
                double[] input = pair;
                bmu.CalculateBMU(input);
            }

            // update the error
            return(bmu.WorstDistance / 100.0);
        }
예제 #2
0
        public double CalculateError(double[][] data)
        {
            var bmu = new BestMatchingUnit(this);

            bmu.Reset();

            // Determine the BMU for each training element.
            foreach (var pair in data)
            {
                var input = pair;
                bmu.CalculateBMU(input);
            }

            // update the error
            return bmu.WorstDistance/100.0;
        }