Metadata-Version: 2.4
Name: jiacheng_wu_ml_from_scratch_486
Version: 0.1.0
Summary: Machine learning algorithms implemented from scratch with numpy: linear/ridge/lasso regression, logistic regression, KNN, and k-means, plus preprocessing, model selection, and evaluation metrics.
Author-email: Jiacheng Wu <jiachengwu591@gmail.com>
Maintainer-email: Jiacheng Wu <jiachengwu591@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project
Project-URL: Documentation, https://jiacheng-wu-ml-from-scratch-486.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project
Project-URL: Issues, https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project/issues
Project-URL: Changelog, https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project/blob/main/release-history.rst
Project-URL: Download, https://pypi.org/pypi/jiacheng-wu-ml-from-scratch-486#files
Keywords: machine-learning,numpy,from-scratch,education,regression,classification,clustering
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <4.0,>=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
License-File: AUTHORS.rst
Requires-Dist: numpy<3.0.0,>=1.26.0
Provides-Extra: dev
Requires-Dist: rich<14.0.0,>=13.8.1; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest<9.0.0,>=8.2.2; extra == "test"
Requires-Dist: pytest-cov<7.0.0,>=6.0.0; extra == "test"
Provides-Extra: doc
Requires-Dist: Sphinx<8.0.0,>=7.4.7; extra == "doc"
Requires-Dist: sphinx-copybutton<1.0.0,>=0.5.2; extra == "doc"
Requires-Dist: sphinx-design<1.0.0,>=0.6.1; extra == "doc"
Requires-Dist: sphinx-jinja<3.0.0,>=2.0.2; extra == "doc"
Requires-Dist: furo==2024.8.6; extra == "doc"
Requires-Dist: pygments<3.0.0,>=2.18.0; extra == "doc"
Requires-Dist: ipython<8.19.0,>=8.18.1; extra == "doc"
Requires-Dist: nbsphinx<1.0.0,>=0.8.12; extra == "doc"
Requires-Dist: rstobj==2.0.0; extra == "doc"
Requires-Dist: docfly==3.0.3; extra == "doc"
Provides-Extra: mise
Requires-Dist: PyGithub<3.0.0,>=2.8.0; extra == "mise"
Requires-Dist: httpx<1.0.0,>=0.28.0; extra == "mise"
Requires-Dist: tomli<3.0.0,>=2.0.0; python_version < "3.11" and extra == "mise"
Dynamic: license-file


.. image:: https://readthedocs.org/projects/jiacheng-wu-ml-from-scratch-486/badge/?version=latest
    :target: https://jiacheng-wu-ml-from-scratch-486.readthedocs.io/en/latest/
    :alt: Documentation Status

.. image:: https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project/actions/workflows/main.yml/badge.svg
    :target: https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project/actions?query=workflow:CI

.. image:: https://codecov.io/gh/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project

.. image:: https://img.shields.io/pypi/v/jiacheng-wu-ml-from-scratch-486.svg
    :target: https://pypi.python.org/pypi/jiacheng-wu-ml-from-scratch-486

.. image:: https://img.shields.io/pypi/l/jiacheng-wu-ml-from-scratch-486.svg
    :target: https://pypi.python.org/pypi/jiacheng-wu-ml-from-scratch-486

.. image:: https://img.shields.io/pypi/pyversions/jiacheng-wu-ml-from-scratch-486.svg
    :target: https://pypi.python.org/pypi/jiacheng-wu-ml-from-scratch-486

.. image:: https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github
    :target: https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
    :target: https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project

------

.. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://jiacheng-wu-ml-from-scratch-486.readthedocs.io/en/latest/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/JiachengWu591/jiacheng_wu_ml_from_scratch_486-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/jiacheng-wu-ml-from-scratch-486#files


Welcome to ``jiacheng_wu_ml_from_scratch_486`` Documentation
==============================================================================
.. image:: https://jiacheng-wu-ml-from-scratch-486.readthedocs.io/en/latest/_static/jiacheng_wu_ml_from_scratch_486-logo.png
    :target: https://jiacheng-wu-ml-from-scratch-486.readthedocs.io/en/latest/

Machine learning algorithms implemented from scratch with numpy, for anyone who wants to see what's
actually inside ``fit()`` and ``predict()`` instead of treating them as black boxes.

Preprocessing & Model Selection
    ``StandardScaler``, ``train_test_split``
Regression
    ``LinearRegression`` (closed-form or gradient descent), ``Ridge`` (L2), ``Lasso`` (L1, via coordinate descent)
Classification
    ``LogisticRegression``, ``KNeighborsClassifier``
Clustering
    ``KMeans`` (k-means++ initialization)
Metrics
    ``mean_squared_error``, ``r2_score``, ``accuracy_score``, ``f1_score``, ``confusion_matrix``, and more

Every estimator follows the familiar ``fit()`` / ``predict()`` / ``score()`` interface, with ``coef_`` /
``intercept_`` style attributes, input validation, and full test coverage -- so it behaves the way you'd
expect if you've used scikit-learn, while staying small enough to read start to finish in an afternoon.

.. code-block:: python

    from jiacheng_wu_ml_from_scratch_486 import train_test_split, StandardScaler, Ridge, r2_score

    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

    scaler = StandardScaler()
    X_train = scaler.fit_transform(X_train)
    X_test = scaler.transform(X_test)

    model = Ridge(alpha=1.0).fit(X_train, y_train)
    print(r2_score(y_test, model.predict(X_test)))


.. _install:

Install
------------------------------------------------------------------------------

``jiacheng_wu_ml_from_scratch_486`` is released on PyPI, so all you need is to:

.. code-block:: console

    $ pip install jiacheng-wu-ml-from-scratch-486

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade jiacheng-wu-ml-from-scratch-486
