TheAlgorithms / Python

All Algorithms implemented in Python
https://thealgorithms.github.io/Python/
MIT License
194.07k stars 45.62k forks source link

Some algorithms are "how-to" examples #6216

Open poyea opened 2 years ago

poyea commented 2 years ago

In our Contributing Guidelines:

Algorithms in this repo should not be how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values. Those calculations or manipulations can use data types, classes, or functions of existing Python packages but each algorithm in this repo should add unique value.

And after some investigation like #6201, one can find some implementations that resemble online tutorials or are too trivial. In #6201, machine_learning/support_vector_machines.py is removed. It should be migrated to a much detailed implementation of SVM instead of importing packages.

Migration list:

Bjiornulf commented 2 years ago

I am currently trying to implement it using SciPy (for minimization and maximization). Will keep you updated with the advancement.

Bjiornulf commented 2 years ago

Maybe the following files should be added to the migration list

Sharukpy commented 2 years ago

check the typos and try using with different libraries.

shrutiiivij commented 2 years ago

there are lots of pre define dictionary available in the python so we can use some other sort of libraries.

Bjiornulf commented 2 years ago

@Sharukpy @shrutiiivij I don't understand your point... Changing up libraries doesn't make those files any less "how-to" examples. There are no algorithms being implemented in the files, rather using well-known libraries to do the job. Correct me if I'm wrong, but this repository is about re-implementing algorithms in Python, so that people can actually understand what is happening under the hood (to some extent).

tianyizheng02 commented 2 years ago

fuzzy_logic/fuzzy_operations.py should also be added to the migration list. The file has no algorithm functions (or any functions for that matter) and all the fuzzy logic operations are simply performed using functions from the skfuzzy module.

tianyizheng02 commented 1 year ago

@cclauss We should reopen this issue since there are still quite a few how-tos, especially in machine_learning/

tianyizheng02 commented 1 year ago

We can add computer_vision/cnn_classification.py and machine_learning/lstm/lstm_prediction.py to the list as well

tianyizheng02 commented 1 year ago

@cclauss Could we reopen this issue since most of the "algorithms" listed here are still how-tos?

tianyizheng02 commented 1 year ago

This isn't a "how-to", but maths/add.py should definitely be considered as "too trivial":

https://github.com/TheAlgorithms/Python/blob/0ef930697632a1f05dbbd956c4ccab0473025f5b/maths/add.py#L6-L13

Given that the repo already has more detailed implementations of addition, it should be fine to just delete this one.

sanjayv2002 commented 1 year ago

Hi Guys, need some help here, So I was going through the issues and some of them are open and some are closed, so It will be great if one of you can point out any algorithms for implementation. I am looking to implement some and your suggestions are welcomed, Please let me know if any algorithms are available in Machine learning Domain,

I was planning on following along the forecasting section using LSTM, and as I was reading through the issues, I understood that it was just an "how- to" on how to implement the concept of forecasting using multiple machine learning algorithms. So If I implemented what I was planning to then it will also End up as an "how -to".

Thank you, Eager for your responces

cclauss commented 1 year ago

Please remember that on October 1st we had zero open PR and today we have 180 plus. We have been working as volunteers daily to review and merge quality contributions. We have carefully written our definition of an algorithm in CONTRIBUTING.md. Nevertheless, it is a bit subjective to determine what is a how-to-use and what is an algorithm so our decision-making might not please everyone. If a contribution leans too hard on a third-party module, it may not deliver enough innovation to merit our visitors' study.