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

Commit 5c04314

Browse files
committed
skel: model: Correct reuse of x in accuracy
Coverity: 294622 Signed-off-by: John Andersen <[email protected]>
1 parent f77d06b commit 5c04314

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
@@ -100,7 +100,7 @@ async def accuracy(self, sources: SourcesContext) -> Accuracy:
100100
# Use self.logger to report how many records are being used for testing
101101
self.logger.debug("Number of test records: %d", len(x))
102102
# Calculate the regression line for test data and accuracy of line
103-
regression_line = [m * x + b for x in x]
103+
regression_line = [m * x_element + b for x_element in x]
104104
accuracy = coeff_of_deter(y, regression_line)
105105
# Update the accuracy to be the accuracy when assessed on the test data
106106
self.storage["regression_line"] = m, b, accuracy

0 commit comments

Comments
 (0)