Skip to content

Commit 355ffd0

Browse files
authored
change regression/poly_desc() (#684)
1 parent 1318058 commit 355ffd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regression/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def poly_desc(W, b):
2525
"""Creates a string description of a polynomial."""
2626
result = 'y = '
2727
for i, w in enumerate(W):
28-
result += '{:+.2f} x^{} '.format(w, len(W) - i)
28+
result += '{:+.2f} x^{} '.format(w, i + 1)
2929
result += '{:+.2f}'.format(b[0])
3030
return result
3131

0 commit comments

Comments
 (0)