mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Optimized recursive_bubble_sort (#2410)
* optimized recursive_bubble_sort * Fixed doctest error due whitespace * reduce loop times for optimization * fixup! Format Python code with psf/black push Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -153,7 +153,7 @@ def calculate_variance(items: list, means: list, total_count: int) -> float:
|
||||
def predict_y_values(
|
||||
x_items: list, means: list, variance: float, probabilities: list
|
||||
) -> list:
|
||||
""" This function predicts new indexes(groups for our data)
|
||||
"""This function predicts new indexes(groups for our data)
|
||||
:param x_items: a list containing all items(gaussian distribution of all classes)
|
||||
:param means: a list containing real mean values of each class
|
||||
:param variance: calculated value of variance by calculate_variance function
|
||||
|
Reference in New Issue
Block a user