Skip to content

Commit b8b341c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1a93fd5 commit b8b341c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

machine_learning/linear_regression.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def sum_of_square_error(data_x, data_y, len_data, theta):
6969
return error
7070
except Exception as e:
7171
print(f"Error in calculating sum of square error: {e}")
72-
return float('inf') # Return infinity in case of an error
72+
return float("inf") # Return infinity in case of an error
7373

7474

7575
def run_linear_regression(data_x, data_y):
@@ -105,7 +105,7 @@ def mean_absolute_error(predicted_y, original_y):
105105
return total / len(original_y)
106106
except Exception as e:
107107
print(f"Error in calculating mean absolute error: {e}")
108-
return float('inf')
108+
return float("inf")
109109

110110

111111
def main():

0 commit comments

Comments
 (0)