Rate error bugfix

Esse commit está contido em:
Borut
2016-08-19 22:05:07 +02:00
commit 4cfd5a828f
2 arquivos alterados com 6 adições e 2 exclusões
+3 -1
Ver Arquivo
@@ -1969,6 +1969,7 @@
testSet = set.slice(numTrain);
}
var lastError = 0;
while ((!abort && iterations < this.iterations && error > this.error)) {
if (crossValidate && error <= this.crossValidate.testError) {
break;
@@ -1984,7 +1985,7 @@
}
if(typeof this.rate === 'function') {
currentRate = this.rate(iterations, error);
currentRate = this.rate(iterations, lastError);
}
if (crossValidate) {
@@ -1998,6 +1999,7 @@
// check error
error /= currentSetSize;
lastError = error;
if (options) {
if (this.schedule && this.schedule.every && iterations %
+3 -1
Ver Arquivo
@@ -74,6 +74,7 @@ Trainer.prototype = {
testSet = set.slice(numTrain);
}
var lastError = 0;
while ((!abort && iterations < this.iterations && error > this.error)) {
if (crossValidate && error <= this.crossValidate.testError) {
break;
@@ -89,7 +90,7 @@ Trainer.prototype = {
}
if(typeof this.rate === 'function') {
currentRate = this.rate(iterations, error);
currentRate = this.rate(iterations, lastError);
}
if (crossValidate) {
@@ -103,6 +104,7 @@ Trainer.prototype = {
// check error
error /= currentSetSize;
lastError = error;
if (options) {
if (this.schedule && this.schedule.every && iterations %