MCPcopy Create free account
hub / github.com/FidoProject/Fido / getError

Method getError

src/FidoControlSystem.cpp:99–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98
99double FidoControlSystem::getError(std::vector<double> input, std::vector<double> correctOutput) {
100 double totalError = 0;
101 std::vector<double> output = network->getOutput(input);
102 for(unsigned int a = 0; a < output.size(); a++) {
103 totalError += pow(output[a] - correctOutput[a], 2);
104 }
105
106 return totalError / (double)output.size();
107}
108
109double FidoControlSystem::trainOnHistories(std::vector<FidoControlSystem::History> selectedHistories, double allowedError, unsigned int maxIterations) {
110

Callers

nothing calls this directly

Calls 2

getOutputMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected