Metadata-Version: 2.4
Name: miniml-adv
Version: 0.1.0
Summary: Machine Learning Library Built From Scratch Using NumPy
Author: Akshay Choudhary
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: scikit-learn
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# MiniML

A Machine Learning Library Built From Scratch Using NumPy.

MiniML is a machine learning library implemented completely from scratch using NumPy without relying on scikit-learn for core algorithms.

The goal of this project is to deeply understand:

- Machine Learning Algorithms
- Optimization
- Neural Networks
- Backpropagation
- Linear Algebra
- ML Engineering
- Software Architecture

The project includes:

- Classical ML Algorithms
- Clustering Algorithms
- Dimensionality Reduction
- Neural Network Engine
- Optimizers
- Visualization Tools
- Benchmarking System
- CLI Interface

## Features

- [x] Linear Regression
- [x] Logistic Regression
- [x] KNN
- [x] KMeans
- [x] DBSCAN
- [x] PCA
- [x] Neural Networks
- [x] SGD Optimizer
- [x] Momentum Optimizer
- [x] Adam Optimizer
- [x] Mini-Batch Training
- [x] Visualization Tools
- [x] Benchmarking
- [x] CLI Tool

## Installation

```bash
git clone <repo-link>

cd MiniML

pip install -r requirements.txt
```

## Quick Start

```python
from miniml.linear_regression import LinearRegression

model = LinearRegression()

model.fit(X, y)

predictions = model.predict(X)
```

## Neural Network Example

```python
from miniml.neural_network import NeuralNetwork

from miniml.layers import Dense
from miniml.activations import ReLU, Sigmoid

from miniml.optimizers import Adam

model = NeuralNetwork()

model.add(Dense(2, 8))
model.add(ReLU())

model.add(Dense(8, 1))
model.add(Sigmoid())

model.compile(
    loss="binary_cross_entropy",
    optimizer=Adam(learning_rate=0.01)
)

model.fit(X, y, epochs=1000)
```

## Project Architecture

MiniML follows modular ML framework design:

- Layers
- Activations
- Loss Functions
- Optimizers
- Training Engine
- Visualization System
- Benchmarking System

Neural networks are implemented using:

- Forward Propagation
- Backpropagation
- Gradient Descent
- Automatic Gradient Flow

## Mathematical Concepts Implemented

- Gradient Descent
- Binary Cross Entropy
- Backpropagation
- Covariance Matrices
- Eigen Decomposition
- Distance Metrics
- Clustering Optimization
- Numerical Stability
- Vectorized Computation

## Benchmarking

MiniML includes benchmarking tools comparing:

- Training Time
- Prediction Time
- Accuracy
- Memory Usage

against scikit-learn implementations.

## Visualization Tools

- Loss Curves
- Accuracy Curves
- Decision Boundaries
- Cluster Visualizations
- PCA Projections

## CLI Usage

```bash
python cli.py --model linear_regression

python cli.py --model logistic_regression

python cli.py --model kmeans

python cli.py --model neural_network
```

## Folder Structure

```text
MiniML/
│
├── miniml/
├── benchmarks/
├── visualizations/
├── examples/
├── tests/
├── datasets/
├── cli.py
├── README.md
└── requirements.txt
```

## Future Improvements

- CNN Layers
- Transformer Architecture
- GPU Support
- Automatic Differentiation Engine
- Model Serialization
- Hyperparameter Tuning
- Distributed Training
- CUDA Acceleration

---

![Python](https://img.shields.io/badge/Python-3.10-blue) ![NumPy](https://img.shields.io/badge/NumPy-Enabled-green) ![License](https://img.shields.io/badge/License-MIT-yellow)
