Skip to content

Commit 4c6fd8f

Browse files
Change summation_value to float initialization
1 parent 6825862 commit 4c6fd8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

machine_learning/gradient_descent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def summation_of_cost_derivative(index: int, end: int = m) -> float:
9999
Note: If index is -1, this means we are calculating summation wrt to biased
100100
parameter.
101101
"""
102-
summation_value = 0
102+
summation_value = 0.0
103103
for i in range(end):
104104
if index == -1:
105105
summation_value += _error(i)

0 commit comments

Comments
 (0)