Skip to content

Commit 3a1d282

Browse files
committed
fix off-by-one error 😕
1 parent 64b5126 commit 3a1d282

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ def sqerr(matrix1, matrix2):
4545
system_identifier.SystemIdentifier(XX[:SPLIT], YY[:SPLIT], RANK, REG)]):
4646
print(' {}'.format(regressor))
4747
training_error = sqerr(regressor.predict(XX[:SPLIT]), YY[:SPLIT])
48-
testing_error = sqerr(regressor.predict(XX[SPLIT+1:]), YY[SPLIT+1:])
48+
testing_error = sqerr(regressor.predict(XX[SPLIT:]), YY[SPLIT:])
4949
print(' Training error: {}\n Testing error: {}'
5050
.format(training_error, testing_error))

0 commit comments

Comments
 (0)