Follow Flake8 pep3101 and remove modulo formatting (#7339)

* ci: Add ``flake8-pep3101`` plugin to ``pre-commit``

* refactor: Remove all modulo string formatting

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refactor: Remove ``flake8-pep3101`` plugin from ``pre-commit``

* revert: Revert to modulo formatting

* refactor: Use f-string instead of `join`

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Caeden Perelli-Harris
2022-10-16 21:50:11 +01:00
committed by GitHub
parent 7f6e0b656f
commit f15cc2f01c
9 changed files with 15 additions and 19 deletions

View File

@ -82,7 +82,7 @@ def run_linear_regression(data_x, data_y):
for i in range(0, iterations):
theta = run_steep_gradient_descent(data_x, data_y, len_data, alpha, theta)
error = sum_of_square_error(data_x, data_y, len_data, theta)
print("At Iteration %d - Error is %.5f " % (i + 1, error))
print(f"At Iteration {i + 1} - Error is {error:.5f}")
return theta