RoboticsClubIITJ / ML-DL-implementation

An implementation of ML and DL algorithms from scratch in python using nothing but NumPy and Matplotlib.
BSD 3-Clause "New" or "Revised" License
49 stars 69 forks source link

Some changes has been Done in LDA code #206

Open Ritik-in-Tech opened 1 year ago

Ritik-in-Tech commented 1 year ago

References to other Issues or PRs or Relevant literature

This is the link of the code file https://colab.research.google.com/drive/1tCT28q7D3YlMnGmVLEiFWsAdT2hlW-ZY?usp=sharing

Brief description of what is fixed or changed

Other comments

rohansingh9001 commented 1 year ago

@testgithubtiwari we cannot merge this PR in its current state. I would like to offer some suggestions to meet this repository's requirements.

I observe you have used sklearn, which in itself is a machine-learning library. Since we are aiming to implement algorithms from scratch, I advise you to avoid using them. Moreover functionality like test train split is very easy to implement in itself using numpy.

We also have our own copy of the iris dataset in the Examples/datasets directory. You can use that instead of sklearn's copy of iris.

In the latter half, you have also implemented the LDA algorithm from scratch. You only need to merge this code, not anything above that.

Moreover, you have also written some driver code. This should never be placed in the implementation modules as they will run when you import this module in some other python file.

Create a new file in the Examples folder and shift this driver code over there.

Lastly do not convert ipynb notebooks to code directly. Please use a proper text editor and use proper lifting (flake8 in this case) to check your code for lint mistakes. Follow the formatting scheme already present in the library, you can view other files for reference.

Lastly use pytest to check if all the tests are passing and addition of your code did not break anything. A good contribution also includes unit tests added for whatever functions and classes you added.

For the time being, you can look at the details of checks to see how you can correct the lint errors.

Ritik-in-Tech commented 1 year ago

Thank's for your suggestion I try to meet these requirements.