コード例 #1
0
        public string lern(gateValue net, int iterations, double error)
        {
            AdalineMPLNetworkController network  = getNetwork(net);
            List <TestData>             lernData = getTestData(net);


            while (iterations != 0)
            {
                foreach (TestData actData in lernData)
                {
                    network.lernArr(actData.x, actData.res, error);
                    //network.lern(actData.x, actData.res);
                }
                iterations--;
            }


            return("Act%: " + testGate(net));
        }
コード例 #2
0
        public string lernEnd(gateValue net, double error)
        {
            AdalineMPLNetworkController network  = getNetwork(net);
            List <TestData>             lernData = getTestData(net);
            double iteration = 0;

            do
            {
                foreach (TestData actData in lernData)
                {
                    network.lernArr(actData.x, actData.res, error);
                }
                iteration++;
                if (iteration >= 10e4)
                {
                    break;
                }
            } while (testGate(net) != 1);
            //if (testGate(net) != 1)

            return("iter" + iteration + "  " + "Act%: " + testGate(net));
        }