mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-29 17:08:49 +08:00
Tighten up psf/black and flake8 (#2024)
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
co-authored by
github-actions
parent
21ed8968c0
commit
1f8a21d727
@@ -186,7 +186,8 @@ def predict_y_values(
|
||||
>>> means = [5.011267842911003, 10.011267842911003, 15.011267842911002]
|
||||
>>> variance = 0.9618530973487494
|
||||
>>> probabilities = [0.3333333333333333, 0.3333333333333333, 0.3333333333333333]
|
||||
>>> predict_y_values(x_items, means, variance, probabilities) # doctest: +NORMALIZE_WHITESPACE
|
||||
>>> predict_y_values(x_items, means, variance,
|
||||
... probabilities) # doctest: +NORMALIZE_WHITESPACE
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2]
|
||||
@@ -211,7 +212,7 @@ def predict_y_values(
|
||||
# appending discriminant values of each item to 'results' list
|
||||
results.append(temp)
|
||||
|
||||
return [l.index(max(l)) for l in results]
|
||||
return [result.index(max(result)) for result in results]
|
||||
|
||||
|
||||
# Calculating Accuracy
|
||||
|
||||
Reference in New Issue
Block a user