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:
Du Yuanchao
2020-09-10 16:31:26 +08:00
committed by GitHub
parent 25946e4570
commit 4d0a8f2355
60 changed files with 900 additions and 859 deletions

View File

@ -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)