Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 1.29 KB

CONTRIBUTING.md

File metadata and controls

38 lines (31 loc) · 1.29 KB

Contributing to ML From Scratch

Thanks for your interest! Here's how to contribute.

Pick an Algorithm

Check the main README.md for the index table. Pick any algorithm marked ⬜.

Folder Template

Every algorithm folder must contain exactly:

<algorithm_name>/
├── README.md            # follow the 12-section template
├── <algorithm_name>.py  # from-scratch class with fit/predict
├── example.py           # runnable demo

Code Rules

  • Python 3.10+ with type hints
  • NumPy only in the algorithm file (no scikit-learn, pytorch, etc.)
  • scikit-learn is allowed only in example.py for loading data or benchmarking
  • Class-based API: .fit(X, y), .predict(X), and where relevant .predict_proba(X) / .transform(X)
  • NumPy-style docstrings
  • python example.py must run and print output

README Rules

All 12 sections must be filled in. The Interview Q&A section needs at least 4 questions.

How to Submit

  1. Fork the repo
  2. Create a branch: git checkout -b add-<algorithm_name>
  3. Add your files following the template
  4. Test: python example.py runs successfully
  5. Open a pull request

Code Style

  • 4 spaces for indentation
  • Max line length: 100 characters
  • Descriptive variable names (not single letters, except standard math notation like X, y, w, b)