A beginner-friendly machine learning library that automates preprocessing, training, and evaluation.
- ⚡ Minimal setup — no complex configuration
- 🤖 Automatic pipeline (scaling, splitting, evaluation)
- 📊 Built-in metrics for regression & classification
- 🧠 Designed for beginners learning ML concepts
- 🧩 Clean and simple API inspired by sklearn
- Version : 1.0.7 - 1.0.6
- Release Date: 2026-05-03
Pipeline With Inbuilt Analysis Method With Regulizations class supportevaluation() Function Support in All Classes
More Info: CHANGELOG
More Parameter Info (in Pipeline): README
More Parameter Info (in linear_models): README
Read Doc Strings For Extra Information About Parameter
- Shape varification issue in
linear_model - Auto Scaler Problem
- MIT License to GNU GPL v3
analysis()toevaluate()in Pipeline
- Folder: Pipeline
- File: Pipeline/_pipeline.py
- Linear Regression (Single & Multi-feature)
- Logistic Regression (Binary & Multi-class)
- Ridge Regression (L2 Regularization)
- Lasso Regression (L1 Regularization)
- Elastic Net (L1 + L2)
- Mean Squared Error (MSE)
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
- R² Score
- Accuracy (for classification)
✔ Supports single-output and multi-output tasks
- StandardScaler
- MinMaxScaler
-
Train-Test Split
- Supports
stratifyfor balanced sampling
- Supports
All models in rslearn are implemented using Gradient Descent.
-
Feature scaling is highly recommended for stable and faster convergence.
-
Use:
StandardScaler(recommended)- or
MinMaxScaler
models include Inbuilt StandardScaler Feature in fit() Method:
scale=True # default- Automatically applies feature scaling internally
- Helps prevent numerical instability
rslearn/
│
├── linear_model/
│ ├── _linear_regression.py
│ ├── _logistic_regression.py
│ ├── _ridge.py
│ ├── _lasso.py
│ ├── _elastic_net.py
│
├── preprocessing/
│ ├── _scaler.py
│
├── metrics/
│ ├── _regression.py
│
├── model_selection/
│ ├── _split.py
│
└── README.md
📌 Each module contains its own detailed README with usage examples and explanations.
git clone https://github.com/Rustam-Singh-Bhadouriya/rslearn-ML.git
cd rslearnpip install rslearn-MLpip install -r requirements.txtfrom rslearn.linear_model import LinearRegression
from rslearn.preprocessing import StandardScaler
import numpy as np
X = np.array([10, 20, 30])
y = np.array([5, 10, 15])
scaler = StandardScaler()
X_scaled = scaler.fit_transform(X)
model = LinearRegression()
model.fit(X_scaled, y)
print(model.predict([40]))-
Each folder includes its own README.md
-
Covers:
- Usage
- Parameters
- Examples
- Internal working
- Understand ML algorithms from scratch
- Build a sklearn-like API
- Create reusable and modular ML components
- Learn real-world ML system design
- Check Self Ability
Rustam Singh Bhadouriya
This project is licensed under the GNU GPL v3 License.