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)); }
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)); }