A simple sklearn-like ML library built from scratch, Relaunch For rslearn-ML
Project description
๐ rslearn
A beginner-friendly machine learning library that automates preprocessing, training, and evaluation.
โจ Why rslearn?
- โก 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
Release & Changes
- Version : 1.0.7 - 1.0.1
- Release Date: 2026-05-26
๐ Features
Latest (In Pipeline & linear_model):
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
Fix
- Shape varification issue in
linear_model - Auto Scaler Problem
Changed
- MIT License to GNU GPL v3
analysis()toevaluate()in Pipeline
๐๏ธ New File & Folders
- Folder: Pipeline
- File: Pipeline/_pipeline.py
Download Version Specific Module
๐ Linear Models
- Linear Regression (Single & Multi-feature)
- Logistic Regression (Binary & Multi-class)
- Ridge Regression (L2 Regularization)
- Lasso Regression (L1 Regularization)
- Elastic Net (L1 + L2)
๐ Metrics
- 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
๐ง Preprocessing
- StandardScaler
- MinMaxScaler
๐งช Model Selection
-
Train-Test Split
- Supports
stratifyfor balanced sampling
- Supports
โ๏ธ Optimization Details
All models in rslearn are implemented using Gradient Descent.
โ ๏ธ Important:
-
Feature scaling is highly recommended for stable and faster convergence.
-
Use:
StandardScaler(recommended)- or
MinMaxScaler
๐ค Auto Standard Scaling (Linear, Logistic, Ridge, Lasso, ElasticNet)
models include Inbuilt StandardScaler Feature in fit() Method:
scale=True # default
- Automatically applies feature scaling internally
- Helps prevent numerical instability
๐ Project Structure
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.
๐ ๏ธ Installation
Clone the repository
git clone https://github.com/ItzRustam/rslearn-ML.git
cd rslearn
Install Usable Library (Stable - Latest)
pip install rslearn-py
Download Version Specific Module
Install dependencies
pip install -r requirements.txt
๐ Quick Example
from 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]))
๐ Documentation
-
Each folder includes its own README.md
-
Covers:
- Usage
- Parameters
- Examples
- Internal working
๐ฏ Goals of this Project
- 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
๐งโ๐ป Author
ItzRustam
๐ License
This project is licensed under the GNU GPL v3 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rslearn_py-1.0.1.tar.gz.
File metadata
- Download URL: rslearn_py-1.0.1.tar.gz
- Upload date:
- Size: 35.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5886b0b18c5098a5c387c0173117b06899b1c7849e8de172022994b2835a22d9
|
|
| MD5 |
4d539d4931ec0b9c7a58925113a2ca1e
|
|
| BLAKE2b-256 |
2f8ae31b8ee1d9a6512ffe2d24144d67be9294371152a806670f69cd5c7ddaa6
|
File details
Details for the file rslearn_py-1.0.1-py3-none-any.whl.
File metadata
- Download URL: rslearn_py-1.0.1-py3-none-any.whl
- Upload date:
- Size: 44.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbd8aecbad7c6f836ecfd98db4e4ecd60ffb29f53081d621841f0ae7e02fa62c
|
|
| MD5 |
ef80d2a98e48cd1b606ded9656b76ef2
|
|
| BLAKE2b-256 |
cf9b95eb5dd38a2be676062e77d417936876e92d5f1469d458df3749a5b0d9aa
|