예제 #1
0
        public void Learn(TeachingElement element)
        {
            forwardPropagate(element);
            backPropagate(element);

            GlobalError = countGlobalError(_outputLayer.Errors);
        }
예제 #2
0
        private List <double> forwardPropagate(TeachingElement element)
        {
            List <double> inputResponse  = layerResponse(_inputLayer, element.Inputs);
            List <double> hiddenResponse = hiddenLayersResponse(inputResponse);
            List <double> outputResponse = layerResponse(_outputLayer, hiddenResponse);

            return(outputResponse);
        }
예제 #3
0
        public int Test(Bitmap image)
        {
            TeachingElement element = _parser.CreateTeachingElementFromImage(image, 2);

            var output = _network.Test(element);

            return((int)output);
        }
예제 #4
0
        public double Test(TeachingElement element)
        {
            List <double> outputResponse = forwardPropagate(element);

            var sortedOutputResponse = new List <double>(outputResponse);

            sortedOutputResponse.Sort();
            sortedOutputResponse.Reverse();

            return(outputResponse.IndexOf(sortedOutputResponse.First()));
        }
예제 #5
0
 private void backPropagate(TeachingElement element)
 {
     _outputLayer.SetOuputNeuronsError(element.ExpectedOutputs);
     propagateErrorThroughLayers();
     adjustWeights();
 }