Metadata-Version: 2.4
Name: math4ml
Version: 0.1.4
Summary: A lightweight math and statistics library for machine learning with educational tutorials and interactive examples.
License: MIT
Keywords: math,machine-learning,linear-algebra,statistics,ml,education,numpy
Author: Sanjay Ram - sanjayram.data@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
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-Dist: numpy (>=1.25,<2.0)
Requires-Dist: scipy (>=1.12,<2.0)
Project-URL: Documentation, https://github.com/SANJAYRAM-DS/math4ml
Project-URL: Homepage, https://github.com/SANJAYRAM-DS
Project-URL: Repository, https://github.com/SANJAYRAM-DS/math4ml
Description-Content-Type: text/markdown

# 📘 **math4ml — A Lightweight Math & Stats Library for Machine Learning**

**math4ml** is a modular, NumPy-backed Python library designed to **teach**, **visualize**, and **compute** the mathematics behind AI & Machine Learning.

It combines:

- **Linear algebra**
- **Statistics**
- **Probability**
- **Hypothesis testing**
- **Preprocessing**
- **Visualizations**
- **Educational examples**

with **NumPy speed**, **Numba optimizations**, and **Khan-Academy–style explanations**.

---

# 🚀 **Features**

## **1. Linear Algebra**

- Matrix operations: `matmul`, `add`, `subtract`, `transpose`, `inverse`, `det`, …
- Vector operations: `dot`, `norm`, `angle`, `projection`, …
- Decompositions: **LU**, **QR**, **SVD** *(optional upgrade)*
- **Interactive visualizations** for matrix multiplication, dot products, transformations, etc.

---

## **2. Statistics**

- Descriptive stats: `mean`, `var`, `std`, `median`, `range`
- Correlation: **Pearson**, **Spearman**
- Distributions: **normal**, **binomial**, **uniform**, **Poisson**
- Hypothesis tests:
  - **t-test**
  - **chi-square test**
  - **ANOVA**
  - **z-test**
  - **non-parametric tests** (coming soon)

---

## **3. Probability**

- PMF, PDF, CDF utilities
- Combinatorics: `nCr`, `nPr`
- Bayes theorem helpers
- Random variable simulation utilities

---

## **4. Preprocessing**

- Scaling:
  - StandardScaler
  - MinMaxScaler
  - MaxAbsScaler
  - RobustScaler
- Encoding:
  - One-hot
  - Label
  - Binary
- Feature engineering helpers

---
## **5.optimization**

-

## **6.ml_models**
-classification_models
    -"LogisticRegression",
    -"NaiveBayes",
    -"KNN"
-linear_models
    -"LinearRegression",
    -"RidgeRegression",
    -"LassoRegression"
-metrics
    -"RegressionMetrics",
    -"ClassificationMetrics"
-validation
    -"CrossValidation"

## **7. Educational Tools**

Every function includes:

- 🧮 **Mathematical formula**
- 📘 **Concept explanation**
- 🔍 **Assumptions**
- ✏️ **Step-by-step example**
- 📓 **Jupyter notebook tutorials**

Perfect for **students learning ML math**, **data scientists**, and **AI researchers**.

---

# 📦 **Installation**

### **PyPI**

```bash
pip install math4ml


**🧠 Quickstart Example**
just use print(math4ml.linalg.__doc__), print(math4ml.__doc__) or help(math4ml)

from math4ml.linalg import matmul
from math4ml.stats import t_test

print(matmul([[1, 2]], [[3], [4]]))

stat, p = t_test([1,2,3], [3,4,5])
print("T-stat:", stat, "P-value:", p)

📚 Tutorials
🔍 Explore: https://github.com/SANJAYRAM-DS/math4ml.tutorials.git

Contains:

-Linear algebra examples

-Statistical tests

-Probability examples

-Preprocessing tutorials

-optimization

-ml_models

🤝 Contributing

We welcome contributions from everyone!

You can help by:

-🐛 Reporting issues

-🌟 Suggesting features

-📘 Improving documentation

-🧪 Adding tests

-🧩 Adding examples

-🔧 Submitting pull requests

📝 License

MIT License — free for commercial, educational, and research use.
