Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit f77d06b

Browse files
committed
skel: model: Correct reuse of x variable in best_fit_line
Coverity: 294623 Signed-off-by: John Andersen <[email protected]>
1 parent 46d3b18 commit f77d06b

File tree

1 file changed

+1
-1
lines changed
  • dffml/skel/model/REPLACE_IMPORT_PACKAGE_NAME

1 file changed

+1
-1
lines changed

dffml/skel/model/REPLACE_IMPORT_PACKAGE_NAME/myslr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def best_fit_line(x, y):
4545
(mean_x ** 2) - statistics.mean(matrix_multiply(x, x))
4646
)
4747
b = mean_y - (m * mean_x)
48-
regression_line = [m * x + b for x in x]
48+
regression_line = [m * x_element + b for x_element in x]
4949
accuracy = coeff_of_deter(y, regression_line)
5050
return m, b, accuracy
5151

0 commit comments

Comments
 (0)