Commit Graph

202 Commits

Author SHA1 Message Date
Adithya Awati
ac68dc1128
Fixed Pytest warnings for machine_learning/forecasting (#8958)
* updating DIRECTORY.md

* Fixed pyTest Warnings

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-14 01:34:16 -07:00
Adithya Awati
c290dd6a43
Update run.py in machine_learning/forecasting (#8957)
* Fixed reading CSV file, added type check for data_safety_checker function

* Formatted run.py

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-14 00:16:24 -07:00
Tianyi Zheng
e406801f9e
Reimplement polynomial_regression.py (#8889)
* Reimplement polynomial_regression.py

Rename machine_learning/polymonial_regression.py to
machine_learning/polynomial_regression.py

Reimplement machine_learning/polynomial_regression.py using numpy
because the old original implementation was just a how-to on doing
polynomial regression using sklearn

Add detailed function documentation, doctests, and algorithm
explanation

* updating DIRECTORY.md

* Fix matrix formatting in docstrings

* Try to fix failing doctest

* Debugging failing doctest

* Fix failing doctest attempt 2

* Remove unnecessary return value descriptions in docstrings

* Readd placeholder doctest for main function

* Fix typo in algorithm description

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-07-28 20:17:46 +02:00
Christian Clauss
4b79d771cd
Add more ruff rules (#8767)
* Add more ruff rules

* Add more ruff rules

* pre-commit: Update ruff v0.0.269 -> v0.0.270

* Apply suggestions from code review

* Fix doctest

* Fix doctest (ignore whitespace)

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

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

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-26 09:34:17 +02:00
Tianyi Zheng
8102424950
local_weighted_learning.py: fix mypy errors and more (#8073) 2023-05-17 12:05:55 +12:00
Christian Clauss
4c1f876567
Solving the Top k most frequent words problem using a max-heap (#8685)
* Solving the `Top k most frequent words` problem using a max-heap

* Mentioning Python standard library solution in `Top k most frequent words` docstring

* ruff --fix .

* updating DIRECTORY.md

---------

Co-authored-by: Amos Paribocci <aparibocci@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-04-27 23:02:07 +05:30
Rohan Anand
bf30b18192
Update linear_discriminant_analysis.py and rsa_cipher.py (#8680)
* Update rsa_cipher.py by replacing %s with {}

* Update rsa_cipher.py

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

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

* Update linear_discriminant_analysis.py

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

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

* Update linear_discriminant_analysis.py

* Update linear_discriminant_analysis.py

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

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

* Update linear_discriminant_analysis.py

* Update linear_discriminant_analysis.py

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

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

* Update linear_discriminant_analysis.py

* Update machine_learning/linear_discriminant_analysis.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update linear_discriminant_analysis.py

* updated

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-04-24 07:28:30 +02:00
Diego Gasco
54dedf844a
Dimensionality reduction (#8590) 2023-04-17 10:34:22 +12:00
Genesis
7cdb011ba4
New gitter link added or replaced (#8551)
* New gitter link added

* ruff==0.0.258

* noqa: S310

* noqa: S310

* Update ruff.yml

* Add Ruff rule S311

* Ruff v0.0.259

* return ("{:08x}" * 5).format(*self.h)

* pickle.load(f)  # noqa: S301

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-03-26 17:19:18 +02:00
pre-commit-ci[bot]
3f9150c1b2
[pre-commit.ci] pre-commit autoupdate (#8294)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.255 → v0.0.257](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.255...v0.0.257)

* Fix PLR1711 Useless  statement at end of function

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-03-20 22:16:13 +01:00
Christian Clauss
c96241b5a5
Replace bandit, flake8, isort, and pyupgrade with ruff (#8178)
* Replace bandit, flake8, isort, and pyupgrade with ruff

* Comment on ruff rules

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-03-15 13:58:25 +01:00
pre-commit-ci[bot]
8959211100
[pre-commit.ci] pre-commit autoupdate (#8177)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.254 → v0.0.255](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.254...v0.0.255)
- [github.com/pre-commit/mirrors-mypy: v1.0.1 → v1.1.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.0.1...v1.1.1)
- [github.com/codespell-project/codespell: v2.2.2 → v2.2.4](https://github.com/codespell-project/codespell/compare/v2.2.2...v2.2.4)

* updating DIRECTORY.md

* Fixes for new version of codespell

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-03-13 23:18:35 +01:00
Christian Clauss
64543faa98
Make some ruff fixes (#8154)
* Make some ruff fixes

* Undo manual fix

* Undo manual fix

* Updates from ruff=0.0.251
2023-03-01 17:23:33 +01:00
Christian Clauss
c909da9b08
pre-commit: Upgrade psf/black for stable style 2023 (#8110)
* pre-commit: Upgrade psf/black for stable style 2023

Updating https://github.com/psf/black ... updating 22.12.0 -> 23.1.0 for their `2023 stable style`.
* https://github.com/psf/black/blob/main/CHANGES.md#2310

> This is the first [psf/black] release of 2023, and following our stability policy, it comes with a number of improvements to our stable style…

Also, add https://github.com/tox-dev/pyproject-fmt and https://github.com/abravalheri/validate-pyproject to pre-commit.

I only modified `.pre-commit-config.yaml` and all other files were modified by pre-commit.ci and psf/black.

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-01 18:44:54 +05:30
Tianyi Zheng
725731c8d2
Refactor local_weighted_learning.py to use np.array (#8069)
* updating DIRECTORY.md

* Format local_weighted_learning.py doctests for clarity

* Refactor local_weighted_learning.py to use np.array instead of np.mat

The np.matrix class is planned to be eventually depreciated in favor of
np.array, and current use of the class raises warnings in pytest

* Update local_weighted_learning.py documentation

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-01-02 14:07:39 +01:00
Victor Rodrigues da Silva
3f8b2af14b
Add autoclave cipher (#8029)
* Add autoclave cipher

* Update autoclave with the given suggestions

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

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

* Fixing errors

* Another fixes

* Update and rename autoclave.py to autokey.py

* Rename gaussian_naive_bayes.py to gaussian_naive_bayes.py.broken.txt

* Rename gradient_boosting_regressor.py to gradient_boosting_regressor.py.broken.txt

* Rename random_forest_classifier.py to random_forest_classifier.py.broken.txt

* Rename random_forest_regressor.py to random_forest_regressor.py.broken.txt

* Rename equal_loudness_filter.py to equal_loudness_filter.py.broken.txt

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-12-18 23:26:39 +01:00
Christian Clauss
08c2245705
Upgrade to flake8 v6 (#8007)
* Upgrade to flake8 v6

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-11-29 16:56:41 +01:00
Mark Mayo
f32d611689
clean of unnecessary checks, imports, calls (#7993) 2022-11-21 00:00:27 +13:00
Dhruv Manilawala
3bf86b91e7
fix: no implicit optional (#7984) 2022-11-15 14:55:14 +01:00
Caeden Perelli-Harris
f512b4d105
refactor: Move pascals triange to maths/ (#7932)
* refactor: Move pascals triange to maths/

* Update xgboost_classifier.py

* statsmodels is now compatible with Python 3.11

* statsmodels is now compatible with Python 3.11

* cython>=0.29.28

* cython>=0.29.28  # For statsmodels on Python 3.11

Co-authored-by: Christian Clauss <cclauss@me.com>
2022-11-01 20:25:39 +01:00
Kushagra Makharia
69d04ff644
Added mean absolute error in linear regression (#7003)
* Added mean absolute error in linear regression

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

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

* Code feedback changes

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

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

* Apply suggestions from code review

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Apply suggestions from code review

* Update linear_regression.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
2022-10-30 13:42:59 +01:00
Kushagra Makharia
47ddba1d91
Added cosine similarity (#7001)
* Added cosine similarity

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

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-29 17:38:40 +02:00
Andrey
cf08d9f5e7
Format docs (#7821)
* Reformat docs for odd_even_sort.py

* Fix docstring formatting

* Apply suggestions from code review

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
2022-10-29 08:26:19 +02:00
Christian Clauss
19bff003aa
Adopt Python >= 3.8 assignment expressions using auto-walrus (#7737)
* Adopt Python >= 3.8 assignment expressions using auto-walrus

* updating DIRECTORY.md

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

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

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-28 15:54:54 +02:00
Caeden Perelli-Harris
61eedc16c3
Remove useless code in doctests (#7733)
* refactor: Fix matrix display deprecation

* refactor: Remove useless `print` and `pass` statements

* revert: Replace broken doctests

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

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

* revert: Fix failing doctests

* chore: Satisfy pre-commit

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-27 22:52:00 +02:00
Caeden Perelli-Harris
9bba42eca8
refactor: Indent ... for visual purposes (#7744) 2022-10-27 19:42:30 +02:00
Caeden Perelli-Harris
e8915097c4
refactor: Fix matrix display deprecation (#7729) 2022-10-27 15:15:15 +02:00
Christian Clauss
81ccf54c75
Rename xgboostclassifier.py to xgboost_classifier.py (#7550)
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-10-23 18:39:25 +05:30
Modassir Afzal
b092f9979f
XGB Regressor (#7107)
* Fixes: #{6551}

* Fixes: #{6551}

* Update xgboostclassifier.py

* Delete xgboostclassifier.py

* Update xgboostregressor.py

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

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

* Fixes: #{6551}

* Fixes : {#6551}

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

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

* Fixes: {#6551]

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

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

* Update xgboostregressor.py

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

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

* Update xgboostregressor.py

* Update xgboostregressor.py

* Fixes: { #6551}

* Update xgboostregressor.py

* Fixes: { #6551}

* Fixes: { #6551}

* Update and rename xgboostregressor.py to xgboost_regressor.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-23 13:47:19 +02:00
Tianyi Zheng
cc10b20beb
Remove some print statements within algorithmic functions (#7499)
* Remove commented-out print statements in algorithmic functions

* Encapsulate non-algorithmic code in __main__

* Remove unused print_matrix function

* Remove print statement in __init__

* Remove print statement from doctest

* Encapsulate non-algorithmic code in __main__

* Modify algorithm to return instead of print

* Encapsulate non-algorithmic code in __main__

* Refactor data_safety_checker to return instead of print

* updating DIRECTORY.md

* updating DIRECTORY.md

* Apply suggestions from code review

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

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

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-22 13:33:51 +02:00
Modassir Afzal
42b56f2345
XGBoost Classifier (#7106)
* Fixes: #{6551}

* Update xgboostclassifier.py

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

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

* Update xgboostclassifier.py

* Update xgboostclassifier.py

* Update xgboostclassifier.py

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

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

* Fixes: #{6551}

* Update xgboostclassifier.py

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

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

* Update xgboostclassifier.py

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

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

* Update xgboostclassifier.py

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

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

* Update xgboostclassifier.py

* Fixes : #6551

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

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

* Fixes : #6551

* Fixes : #6551

* Fixes: #6551

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

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

* Update xgboostclassifier.py

* Update xgboostclassifier.py

* Update xgboostclassifier.py

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

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

* Fixes: #6551

* Fixes #6551

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

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

* Fixes: {#6551}

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

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

* Fixes: {#6551}

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

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

* Fixes: #6551

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

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

* FIXES: {#6551}

* Fixes : { #6551}

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

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

* Fixes : { #6551}

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

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

* Fixes: { #6551]

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

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

* Update xgboostclassifier.py

* Update xgboostclassifier.py

* Apply suggestions from code review

* Update xgboostclassifier.py

* Update xgboostclassifier.py

* Update xgboostclassifier.py

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

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

* Fixes: { #6551}

* Update xgboostclassifier.py

* Fixes: { #6551}

* Update xgboostclassifier.py

* Fixes: ( #6551)

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

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

* Fixes: { #6551}

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-20 23:59:11 +02:00
Sai Ganesh Manda
80ff25ed38
Update gaussian_naive_bayes.py (#7406)
* Update gaussian_naive_bayes.py

Just adding in a final metric of accuracy to declare...

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

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-19 13:43:26 +02:00
Tianyi Zheng
6d1e009f35
Remove depreciated np.float (#7394) 2022-10-18 11:57:03 +02:00
pre-commit-ci[bot]
0c7c5fa7b0
[pre-commit.ci] pre-commit autoupdate (#7387)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.0.0 → v3.1.0](https://github.com/asottile/pyupgrade/compare/v3.0.0...v3.1.0)
- [github.com/codespell-project/codespell: v2.2.1 → v2.2.2](https://github.com/codespell-project/codespell/compare/v2.2.1...v2.2.2)

* updating DIRECTORY.md

* Fix typo discovered by codespell

* Fix typo discovered by codespell

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-17 21:59:25 +02:00
Caeden Perelli-Harris
f15cc2f01c
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>
2022-10-16 22:50:11 +02:00
Sagar Giri
b5b1eb2f00
Fix broken links by PR #7277 (#7319) 2022-10-16 15:45:25 +02:00
Sagar Giri
e7b6d2824a
Change to https. (#7277)
* Change to https.

* Revert the py_tf file.
2022-10-16 09:43:29 +02:00
Caeden
4d0c830d2c
Add flake8 pluin flake8 bugbear to pre-commit (#7132)
* ci(pre-commit): Add ``flake8-builtins`` additional dependency to ``pre-commit`` (#7104)

* refactor: Fix ``flake8-builtins`` (#7104)

* fix(lru_cache): Fix naming conventions in docstrings (#7104)

* ci(pre-commit): Order additional dependencies alphabetically (#7104)

* fix(lfu_cache): Correct function name in docstring (#7104)

* Update strings/snake_case_to_camel_pascal_case.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update data_structures/stacks/next_greater_element.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update digital_image_processing/index_calculation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update graphs/prim.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update hashes/djb2.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* refactor: Rename `_builtin` to `builtin_` ( #7104)

* fix: Rename all instances (#7104)

* refactor: Update variable names (#7104)

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

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

* ci: Create ``tox.ini`` and ignore ``A003`` (#7123)

* revert: Remove function name changes (#7104)

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

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

* Rename tox.ini to .flake8

* Update data_structures/heap/heap.py

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>

* refactor: Rename `next_` to `next_item` (#7104)

* ci(pre-commit): Add `flake8` plugin `flake8-bugbear` (#7127)

* refactor: Follow `flake8-bugbear` plugin (#7127)

* fix: Correct `knapsack` code (#7127)

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

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

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2022-10-13 18:03:06 +02:00
Caeden
07e991d553
Add pep8-naming to pre-commit hooks and fixes incorrect naming conventions (#7062)
* ci(pre-commit): Add pep8-naming to `pre-commit` hooks (#7038)

* refactor: Fix naming conventions (#7038)

* Update arithmetic_analysis/lu_decomposition.py

Co-authored-by: Christian Clauss <cclauss@me.com>

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

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

* refactor(lu_decomposition): Replace `NDArray` with `ArrayLike` (#7038)

* chore: Fix naming conventions in doctests (#7038)

* fix: Temporarily disable project euler problem 104 (#7069)

* chore: Fix naming conventions in doctests (#7038)

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-13 00:54:20 +02:00
Eeman Majumder
c0c230255f
added self organising maps algorithm in the machine learning section. (#6877)
* added self organising maps algo

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

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

* Update machine_learning/Self_Organising_Maps.py

* Update and rename Self_Organising_Maps.py to self_organizing_map.py

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

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

* Update self_organizing_map.py

* Update self_organizing_map.py

* Update self_organizing_map.py

* Update self_organizing_map.py

Co-authored-by: Eeman Majumder <eemanmajumder@Eemans-MacBook-Pro.local>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-12 21:43:52 +02:00
pre-commit-ci[bot]
756bb268eb
[pre-commit.ci] pre-commit autoupdate (#6629)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0)
- [github.com/asottile/pyupgrade: v2.37.0 → v2.38.2](https://github.com/asottile/pyupgrade/compare/v2.37.0...v2.38.2)
- https://gitlab.com/pycqa/flake8https://github.com/PyCQA/flake8
- [github.com/PyCQA/flake8: 3.9.2 → 5.0.4](https://github.com/PyCQA/flake8/compare/3.9.2...5.0.4)
- [github.com/pre-commit/mirrors-mypy: v0.961 → v0.981](https://github.com/pre-commit/mirrors-mypy/compare/v0.961...v0.981)
- [github.com/codespell-project/codespell: v2.1.0 → v2.2.1](https://github.com/codespell-project/codespell/compare/v2.1.0...v2.2.1)

* Fix a long line

* Update sol1.py

* Update sol1.py

* lambda_

* Update multi_level_feedback_queue.py

* Update double_ended_queue.py

* Update sequential_minimum_optimization.py

* Update .pre-commit-config.yaml

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-03 22:00:45 +02:00
AHTESHAM ZAIDI
707809b000
Update astar.py (#6456)
* Update astar.py

Improved comments added punctuations.

* Update astar.py

* Update machine_learning/astar.py

Co-authored-by: Caeden <caedenperelliharris@gmail.com>

* Update astar.py

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
2022-10-02 23:55:24 +02:00
Todor Peev
ba129de7f3
Fixes: 6216 | Support vector machines (#6240)
* initial commit

* first implementation of hard margin

* remove debugging print

* many commits squashed because pre-commit was buggy

* more kernels and improved kernel management

* remove unnecessary code + fix names + formatting + doctests

* rename to fit initial naming

* better naming and documentation

* better naming and documentation
2022-07-11 12:42:07 +02:00
Christian Clauss
b75a7c77f8
pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0 (#6245)
* pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0

* pre-commit run --all-files
2022-07-11 10:19:52 +02:00
Vardhaman
2d5dd6f132
MAINT: Updated f-string method (#6230)
* MAINT: Used f-string method

Updated the code with f-string methods wherever required for a better and cleaner understanding of the code.

* Updated files with f-string method

* Update rsa_key_generator.py

* Update rsa_key_generator.py

* Update elgamal_key_generator.py

* Update lru_cache.py

I don't think this change is efficient but it might tackle the error as the error was due to using long character lines.

* Update lru_cache.py

* Update lru_cache.py

Co-authored-by: cyai <seriesscar@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-07-07 16:34:07 +02:00
Erik Parmann
4a51244e0f
Remove how-to example for support vector machine (#6201) 2022-06-24 01:00:55 +08:00
Christian Clauss
24d3cf8244
The black formatter is no longer beta (#5960)
* The black formatter is no longer beta

* pre-commit autoupdate

* pre-commit autoupdate

* Remove project_euler/problem_145 which is killing our CI tests

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-01-30 20:29:54 +01:00
Venkatesh Tantravahi
508589e3fc
Local Weighted Learning (#5615)
* Local Weighted Learning Added

* Delete LWL directory

* Local Weighted Learning Added

* local weighted learning added

* Delete LWL directory

* Delete local_weighted_learning.py

* rephrased code added

* local weight learning updated

* local weight learning updated

* Updated dir

* updated codespell

* import modification

* Doctests added

* doctests updated

* lcl updated

* doctests updated

* doctest values updated
2021-10-31 12:27:50 +01:00
Christian Clauss
cecf43d648
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-07 13:37:03 +02:00
Jenil Shah
7d7c7972ae
Updated name from lstm_prediction.py_tf to lstm_prediction.py and also imported keras (#4422)
* Updated name from lstm_prediction.py_lf to lstm_prediction.py and also imported keras

* Edited the changes

* tensorflow 2.5 is has shipped!!!

* Update lstm_prediction.py

* Update lstm_prediction.py

* One blank line, not two?

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-05-17 14:28:04 +02:00
Dhruv Manilawala
6f21f76696
fix(ci): Update pre-commit hooks and apply new black (#4359)
* fix(ci): Update pre-commit hooks and apply new black

* remove empty docstring
2021-04-26 07:46:50 +02:00
algobytewise
9b60be67af
[mypy] fix small folders 2 (#4293)
* Update perceptron.py

* Update binary_tree_traversals.py

* fix machine_learning

* Update build.yml

* Update perceptron.py

* Update machine_learning/forecasting/run.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-03-26 12:21:16 +01:00
Christian Clauss
987567360e
Update our pre-commit dependencies (#4273)
* .pre-commit-config.yaml: mypy directories that pass

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-03-20 10:42:17 +05:30
CarsonHam
61f3119467
Change occurrences of str.format to f-strings (#4118)
* f-string update rsa_cipher.py

* f-string update rsa_key_generator.py

* f-string update burrows_wheeler.py

* f-string update non_recursive_segment_tree.py

* f-string update red_black_tree.py

* f-string update deque_doubly.py

* f-string update climbing_stairs.py

* f-string update iterating_through_submasks.py

* f-string update knn_sklearn.py

* f-string update 3n_plus_1.py

* f-string update quadratic_equations_complex_numbers.py

* f-string update nth_fibonacci_using_matrix_exponentiation.py

* f-string update sherman_morrison.py

* f-string update levenshtein_distance.py

* fix lines that were too long
2021-02-23 11:23:49 +05:30
Steve Kim
d594f4556c
[mypy] Add/fix type annotations for similarity search in machine learning (#4088)
* [mypy] Add/fix type annotations for similarity search in machine learning

* fix annotation

* fix annotation (Union)

* isort
2021-01-22 10:10:21 +05:30
Christian Clauss
3fdbf9741d
Python 3.9 (#3926)
* Upgrade to Python 3.9

* pip install wheel for faster builds

* updating DIRECTORY.md

* requirements.txt: tensorflow; python_version < '3.9'

* keras requires tensorflow

* Rename lstm_prediction.py to lstm_prediction.py_tf

* Update requirements.txt

* updating DIRECTORY.md

* Update requirements.txt

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2020-11-24 12:41:10 +01:00
Dhruv Manilawala
b9b7fffcc2
Move CI tests from Travis to GitHub (#3889)
* Add initial support for moving tests to GitHub

* Add setup Python step in the workflow

* Remove Travis CI config file

* Fix GitHub action file for build to trigger on PR

* Use Python 3.8 as tensorflow is not yet supported

* Fix ciphers.hill_cipher doctest error

* Fix: instagram crawler tests failing on GitHub actions

* Fix floating point errors in doctest

* Small change to test cache

* Apply suggestions from code review

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update instagram_crawler.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-11-19 22:01:31 +05:30
Steve Kim
ae4d7d4d04
add similarity_search.py in machine_learning (#3864)
* add similarity_search.py in machine_learning
adding similarity_search algorithm in machine_learning

* fix pre-commit test, apply feedback

isort, codespell changed.
applied feedback(np -> np.ndarray)

* apply feedback

add type hints to euclidean method

* apply feedback

- changed euclidean's type hints
- changed few TypeError to ValueError
- changed range(len()) to enumerate()
- changed error's strings to f-string
- implemented without type()
- add euclidean's explanation

* apply feedback

- deleted try/catch in euclidean
- added error tests
- name change(value -> value_array)

* # doctest: +NORMALIZE_WHITESPACE

* Update machine_learning/similarity_search.py

* placate flake8

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-11-13 15:26:17 +01:00
poloso
4851942ec0
Reduce complexity linear_discriminant_analysis. (#2452)
* Reduce complexity linear_discriminant_analysis.

* Fix whitespace

* Update machine_learning/linear_discriminant_analysis.py

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>

* fixup! Format Python code with psf/black push

* Fix format to surpass pre-commit tests

* updating DIRECTORY.md

* Update machine_learning/linear_discriminant_analysis.py

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>

* fixup! Format Python code with psf/black push

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-11-11 08:05:11 +05:30
Nandiya
12c69800bd
Forecast (#3219)
* add forecasting code

* add statsmodel

* sort import

* sort import fix

* fixing black

* sort requirement

* optimize code

* try with limited data

* sort again

* sort fix

* sort fix

* delete warning and black

* add code for forecasting

* use black

* add more hints to describe

* add doctest

* finding whitespace

* fixing doctest

* delete

* revert back

* revert back

* revert back again

* revert back again

* revert back again

* try trimming whitespace

* try adding doctypeand etc

* fixing reviews

* deleting all the space

* fixing the build

* delete x

* add description for safety checker

* deleting subscription integer

* fix docthint

* make def to use function parameters and return values

* make def to use function parameters and return values

* type hints on data safety checker

* optimize code

* Update run.py

Co-authored-by: FVFYK3GEHV22 <fvfyk3gehv22@FVFYK3GEHV22s-MacBook-Pro.local>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-10-24 16:07:27 +02:00
Christian Clauss
9b95e4f662
Pyupgrade to python3.8 (#3616)
* Upgrade to Python 3.8 syntax

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-21 12:46:14 +02:00
Dhruv
acaeb22bbd
Add GitHub action for pre-commit (#2515)
* Add GitHub action file for pre-commit

* Fix errors exposed by pre-commit hook:

- Remove executable bit from files without shebang. I checked those
  file and it was not needed.
- Fix with black

* Apply suggestions from code review

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-30 15:23:34 +02:00
Dhruv
0a42ae9095
Fix all errors mentioned in pre-commit run (#2512)
* Fix all errors mentioned in pre-commit run:

- Fix end of file
- Remove trailing whitespace
- Fix files with black
- Fix imports with isort

* Fix errors
2020-09-30 10:38:00 +02:00
Dhruv
48357cea5b
Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
Abdoulaye Balde
7446e69571
Gradient Boosting Regressor (#2298)
* Stock market prediction using greadient boosting

* To reverse a string using stack

* To reverse string using stack

* Predict Stock Prices Python & Machine Learning

* Gradient boosting regressor on boston dataset

* Gradient boosting regressor implementation

* Gradient boosting regressor

* Gradient boosting regressor

* Gradient boosting regressor

* Removing files

* GradientBoostingRegressor example

* Demo Gradient Boosting

* Demo Gradient boosting

* demo of gradient boosting

* gradient boosting demo

* Fix spelling mistake

* Fix formatting

Co-authored-by: John Law <johnlaw.po@gmail.com>
2020-09-26 16:58:29 +02:00
Du Yuanchao
4d0a8f2355
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>
2020-09-10 10:31:26 +02:00
Tanuj Dhiman
25946e4570
Update scoring_functions.py (#2291)
* Update scoring_functions.py

We can find accuracy by manually if we are not going to use sklearn library.

* Update scoring_functions.py

* Update machine_learning/scoring_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-09 19:04:46 +02:00
Shubham Shaswat
a1d1a44f51
added idf-smooth (#2174)
* added idf-smooth

* added idf-smooth

* added idf-smooth
2020-09-02 19:33:12 +02:00
BAKEZQ
d402cd0b6e
Fix SettingWithCopy warning by pandas (#2346)
* Fix SettingWithCopy warning in pandas

https://github.com/TheAlgorithms/Python/issues/2282

* Update k_means_clust.py

* Update k_means_clust.py

* Update k_means_clust.py

* Update k_means_clust.py

* Update k_means_clust.py

* Update k_means_clust.py
2020-08-23 13:40:57 +02:00
Dan Murphy
1f1c3b0e4b
Added Normalization and Standardization Algorithms (#2192)
* Added Standardization and Normalization algorithms with built-in stats

* Implement ndigits for rounding

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-07-10 15:36:51 +02:00
Christian Clauss
5f4da5d616
isort --profile black . (#2181)
* updating DIRECTORY.md

* isort --profile black .

* Black after

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-06 09:44:19 +02:00
Christian Clauss
cd3e8f95a0
isort --profile black --recursive . (#2170)
* isort --profile black --recursive .

* Update codespell.yml

* typo: vertices

* typo: Explanation

* typo: Explanation

* Fix typos
2020-07-06 08:48:18 +05:30
vinayak
2d3d660155
black fixes and Travis CI fixes (#2160)
* black format

* updating DIRECTORY.md

* fixes

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-02 20:02:15 +05:30
Christian Clauss
8ab84fd794
Only one carriage return (#2155)
* updating DIRECTORY.md

* touch

* fixup! Format Python code with psf/black push

* Update word_frequency_functions.py

* updating DIRECTORY.md

* Update word_frequency_functions.py

* Update lfu_cache.py

* Update sol1.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-25 19:15:30 +02:00
Dan Murphy
b368b1ecfd
NLP Word Frequency Algorithms (#2142)
* NLP Word Frequency Algorithms

* Added type hints and Wikipedia link to tf-idf

* Update machine_learning/word_frequency_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update machine_learning/word_frequency_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update machine_learning/word_frequency_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update machine_learning/word_frequency_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Fix line length for flake8

* Fix line length for flake8 V2

* Add line escapes and change int to float

* Corrected doctests

* Fix for TravisCI

* Fix for TravisCI V2

* Tests passing locally

* Tests passing locally

* Update machine_learning/word_frequency_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update machine_learning/word_frequency_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update machine_learning/word_frequency_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update machine_learning/word_frequency_functions.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Add doctest examples and clean up docstrings

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-06-25 10:00:43 +02:00
beqakd
d034add61f
add visualization of k means clustering as excel format (#2104)
* add visualization of kmneas clust as excel format

* style changes

* style changes

* Add doctest and typehint!

* style change

* Update machine_learning/k_means_clust.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update machine_learning/k_means_clust.py

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-06-19 17:55:13 +02:00
Christian Clauss
9316e7c014
Set the Python file maximum line length to 88 characters (#2122)
* flake8 --max-line-length=88

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-16 10:09:19 +02:00
Christian Clauss
1f8a21d727
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>
2020-05-22 08:10:11 +02:00
Erwin Lejeune
21ed8968c0
Fixes in Bidirectional A* (#2020)
* implement bidirectional astar

* add type hints

* add wikipedia url

* format with black

* changes from review

* fix collision check

* Add testmod()

* # doctest: +NORMALIZE_WHITESPACE

* Codespell: euclidean

* Codespell: coordinates

* Codespell: traversal

* Codespell: remaining

Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-21 21:50:52 +02:00
Christian Clauss
a7cd633bb6
Fix astar (#1966)
* Fix astar

Single character variable names are old school.

* fixup! Format Python code with psf/black push

* Tuple

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-10 20:49:40 +05:30
Jeffin Francis
77c3e5b74b
Added A* algorithm (#1913)
* a* algorithm

* changes after build error

* intent changes

* fix after review

* ImportMissmatchError

* Build failed fix

* doctest changes

* doctest changes
2020-05-10 00:37:36 +05:30
Jeffin Francis
8a8527f1bd
Added Lstm example for stock predection (#1908)
* Added Lstm example for stock predection

* Changes after review

* changes after build failed

* Add Kiera’s to requirements.txt

* requirements.txt: Add keras and tensorflow

* psf/black

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-07 08:53:44 +02:00
QuantumNovice
9bb57fbbfe
support_vector_machines.py increase error tolerance to suppress convergence warnings (#1929)
* Update support_vector_machines.py

* Update support_vector_machines.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-02 21:19:45 +02:00
Christian Clauss
6acd7fb5ce
Wrap lines that go beyond GitHub Editor (#1925)
* Wrap lines that go beyond GiHub Editor

* flake8 --count --select=E501 --max-line-length=127

* updating DIRECTORY.md

* Update strassen_matrix_multiplication.py

* fixup! Format Python code with psf/black push

* Update decision_tree.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-01 23:36:35 +02:00
Prince Gangurde
8c01da20d6
Update random_forest_regressor.py (#1880) 2020-04-17 12:43:50 +02:00
Prince Gangurde
b64c4af296
Create gaussian_naive_bayes.py (#1861)
* Create Gaussian_Naive_Bayes.py

Added Gaussian Naive Bayes algorithm in the module machine learning

* Rename Gaussian_Naive_Bayes.py to gaussian_naive_bayes.py

* requirements.txt: pip install xgboost

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-04-17 09:38:44 +08:00
Prince Gangurde
7ffdef2636
Fix some typos in random forest classifier (#1858) 2020-04-13 02:15:48 +02:00
Miggelito
10fc90c7bd
Added Random Forest Classifier (#1738)
* Added Random Forest Regressor

* Updated file to standard

* Added Random Forest Classifier (Iris dataset) and a Confusion Matrix for result visualization
2020-03-13 09:13:43 +01:00
matkosoric
7f04e5cd34
contribution guidelines checks (#1787)
* spelling corrections

* review

* improved documentation, removed redundant variables, added testing

* added type hint

* camel case to snake case

* spelling fix

* review

* python --> Python # it is a brand name, not a snake

* explicit cast to int

* spaces in int list

* "!= None" to "is not None"

* Update comb_sort.py

* various spelling corrections in documentation & several variables naming conventions fix

* + char in file name

* import dependency - bug fix

Co-authored-by: John Law <johnlaw.po@gmail.com>
2020-03-04 13:40:28 +01:00
Miggelito
f52b97f2c5
Added Random Forest Regressor and tested with flake8 (#1733)
* Added Random Forest Regressor

* Updated file to standard
2020-02-08 00:07:14 +05:30
Christian Clauss
bfcb95b297
Create codespell.yml (#1698)
* fixup! Format Python code with psf/black push

* Create codespell.yml

* fixup! Format Python code with psf/black push
2020-01-18 13:24:33 +01:00
Christian Clauss
28419cf839 pyupgrade --py37-plus **/*.py (#1654)
* pyupgrade --py37-plus **/*.py

* fixup! Format Python code with psf/black push
2020-01-03 22:25:36 +08:00
Christian Clauss
b9bff8f3a7
Remove \r from strings (#1622)
* Remove \r from strings

* Satisfy tensorflow with numpy>=1.17.4
2019-12-10 15:53:50 +01:00
ELNS
43905efe29 Adding doctests into LDA algorithm (#1621)
* Adding doctests into <gaussian_distribution> function

* Adding doctests into <y_generator> function

* Adding doctests into <calculate_mean> function

* Adding doctests into <calculate_probabilities> function

* Adding doctests into <calculate_variance> function

* Adding doctests into <predict_y_values> function

* Adding doctests into <accuracy> function

* fixup! Format Python code with psf/black push

* Update convex_hull.py

* Update convex_hull.py
2019-12-08 23:15:17 +01:00
Christian Clauss
26b0803319
Simplify sudoku.is_completed() using builtin all() (#1608)
* Simplify sudoku.is_completed() using builtin all()

Simplify __sudoku.is_completed()__ using Python builtin function [__all()__](https://docs.python.org/3/library/functions.html#all).

* fixup! Format Python code with psf/black push

* Update sudoku.py

* fixup! Format Python code with psf/black push

* Old style exception -> new style for Python 3

* updating DIRECTORY.md

* Update convex_hull.py

* fixup! Format Python code with psf/black push

* e.args[0] = "msg"

* ValueError: could not convert string to float: 'pi'

* Update convex_hull.py

* fixup! Format Python code with psf/black push
2019-12-08 22:42:17 +01:00
GeorgeChambi
9eb50cc223 Improved readability (#1615)
* improved readability

* further readability improvements

* removed csv file and added f
2019-12-07 06:39:59 +01:00
QuantumNovice
caad74466a Added Multilayer Perceptron (sklearn) (#1609)
* Added Multilayer Perceptron ( sklearn)

* Rename MLPClassifier.py to multilayer_preceptron_classifier.py

* Rename multilayer_preceptron_classifier.py to multilayer_perceptron_classifier.py

* Update multilayer_perceptron_classifier.py
2019-12-03 12:17:42 +01:00
ELNS
f4a7c5066c converting generator object to a list object (#1602)
* converting generator object to a list object

* Refactor: converting generator object to a list object

* fixup! Format Python code with psf/black push
2019-11-28 17:21:34 +01:00
ELNS
140b79b4b2 Adding Linear Discriminant Analysis (#1592)
* Adding new file to the machine_learning directory

* Adding initial documentation

* importing modules

* Adding Normal_gen function

* Adding Y_gen function

* Adding mean_calc function

* Adding prob_calc function

* Adding var_calc function

* Adding predict function

* Adding accuracy function

* Adding main function

* Renaming LDA file

* Adding requested changes

* Renaming some of functions

* Refactoring str.format() statements to f-string

* Removing unnecessary list objects inside two functions

* changing code style in some lines

* Fixing y_generator function

* Refactoring 'predict_y_values' function by using list comprehensions

* Changing code style in import statements

* Refactoring CLI code block

* fixup! Format Python code with psf/black push

* No lines longer than 88 characters
2019-11-26 12:57:53 +01:00
Mantas Zimnickas
12f69a86f5 Remove code with side effects from main (#1577)
* Remove code with side effects from main

When running tests withy pytest, some modules execute code in main scope
and open plot or browser windows.

Moves such code under `if __name__ == "__main__"`.

* fixup! Format Python code with psf/black push
2019-11-17 19:38:48 +01:00