Skip to main content

Machine Learning and Statistical Analysis Toolkit

Project description

ml-learnkit

A lightweight Python toolkit for machine learning and statistical analysis, designed for education. It exposes every intermediate calculation so you can follow along with the maths, not just get an answer.

About the Author

Vincent Amonde

Intern, Big Data Engineering and Machine Learning at Safaricom PLC | 4th Year Student, Maseno University — Bachelor of Mathematical Sciences with IT | 3rd Year Student, The Open University of Kenya — Bachelor of Data Science

Email: vinnyamonde@gmail.com

Features

Load raw Python lists into structured data objects with tabular display. Build a simple linear regression model from first principles without black-box estimators. Access regression coefficients with standard errors, t-statistics, and p-values. Generate ANOVA tables with all sum-of-squares and mean-square decompositions. Render six diagnostic plots in a single call with 95% confidence bands, residual analysis, and influence diagnostics via seaborn.

Installation

Install from PyPI:

pip install ml-learnkit

Requires Python > 3.10.

Quick Start

from ml_learnkit import Reader, SimpleLinearRegressor

# Load data
reader = Reader()
data = reader.read_lists(
    lists=[[1, 2, 3, 4, 5], [2.1, 4.0, 5.9, 8.2, 9.8]],
    columns=["X", "Y"]
)

# Inspect
data.show()

# Fit model
model = SimpleLinearRegressor()
model.fit(data.get("X"), data.get("Y"))

# View results
print(model.equation())
model.regression_table()
model.anova()
model.plot()

Documentation

Complete documentation for each component:

Reader Class — Load data from Python lists into structured containers.

Data Class — Inspect and query tabular data with formatted output.

SimpleLinearRegressor — Fit and diagnose simple linear regression models.

Core Concepts

ml-learnkit implements ordinary least squares (OLS) regression with full transparency. Every calculation step is exposed: computation worksheets, intermediate sums of squares, standard errors, test statistics, and diagnostic plots. This educational design lets you verify each result against your own calculations or textbook examples.

The toolkit computes:

Regression coefficients (intercept b₀ and slope b₁), standard errors and t-statistics for both coefficients, two-tailed p-values from the t-distribution, ANOVA decomposition (SSR, SSE, SST, MSR, MSE, F-statistic), and six diagnostic plots (fitted line, residuals, Q-Q, scale-location, leverage, histogram).

Contributing

Contributions are welcome. You reach out via Email: vinnyamonde@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ml_learnkit-0.1.3.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ml_learnkit-0.1.3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file ml_learnkit-0.1.3.tar.gz.

File metadata

  • Download URL: ml_learnkit-0.1.3.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for ml_learnkit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 91ad7cddf34f8ac54b09de209df580706531fc7c2834f961c8393e4740c90464
MD5 e625eccd85cffdecd0acfe1cff018528
BLAKE2b-256 efa1486f43e5568073cf35c2028703e4cf6c77eb6fa972f90a41b85abb4db954

See more details on using hashes here.

File details

Details for the file ml_learnkit-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ml_learnkit-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for ml_learnkit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2988d5ef50789e44bd80cbf329ec0851ecf74bcd127b566ed88e16dda9fcb05b
MD5 610346736b9f9efb2b65fb885134d787
BLAKE2b-256 7f8b3ef2b6c184cb8d7a99e22bd7e25b64eaaf957e440c0f78447decb3c5857d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page