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:
@ -12,7 +12,7 @@ import requests
|
||||
|
||||
|
||||
def collect_dataset():
|
||||
""" Collect dataset of CSGO
|
||||
"""Collect dataset of CSGO
|
||||
The dataset contains ADR vs Rating of a Player
|
||||
:return : dataset obtained from the link, as matrix
|
||||
"""
|
||||
@ -32,7 +32,7 @@ def collect_dataset():
|
||||
|
||||
|
||||
def run_steep_gradient_descent(data_x, data_y, len_data, alpha, theta):
|
||||
""" Run steep gradient descent and updates the Feature vector accordingly_
|
||||
"""Run steep gradient descent and updates the Feature vector accordingly_
|
||||
:param data_x : contains the dataset
|
||||
:param data_y : contains the output associated with each data-entry
|
||||
:param len_data : length of the data_
|
||||
@ -51,7 +51,7 @@ def run_steep_gradient_descent(data_x, data_y, len_data, alpha, theta):
|
||||
|
||||
|
||||
def sum_of_square_error(data_x, data_y, len_data, theta):
|
||||
""" Return sum of square error for error calculation
|
||||
"""Return sum of square error for error calculation
|
||||
:param data_x : contains our dataset
|
||||
:param data_y : contains the output (result vector)
|
||||
:param len_data : len of the dataset
|
||||
@ -66,7 +66,7 @@ def sum_of_square_error(data_x, data_y, len_data, theta):
|
||||
|
||||
|
||||
def run_linear_regression(data_x, data_y):
|
||||
""" Implement Linear regression over the dataset
|
||||
"""Implement Linear regression over the dataset
|
||||
:param data_x : contains our dataset
|
||||
:param data_y : contains the output (result vector)
|
||||
:return : feature for line of best fit (Feature vector)
|
||||
|
Reference in New Issue
Block a user