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.
NOTE
This is Python version of this library visit more.
Origination - rslearn-lib
โจ 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.2
- Release Date: 2026-06-04
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
โ ๏ธ Immediate Fix
- Classificaiton Metrics Evaluation Breakage
- Pipeline Invalid Arg Fix
- Wrong URLs
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/rslearn-lib/rslearn-ML-py.git
cd rslearn-ML-py/
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
๐จ Origination
rslearn-lib
๐ 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.2.tar.gz.
File metadata
- Download URL: rslearn_py-1.0.2.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71f97bb8af5145ca702f702566b45066a94e0094406d1c5682b5d48fa1a9c4a5
|
|
| MD5 |
8f1e8cb243d390b2cc66818a1d9bdf0b
|
|
| BLAKE2b-256 |
e98cd34e40c047053436daf30d1a45299a4de82f9c3ff5a337a150f84ee3d8e2
|
File details
Details for the file rslearn_py-1.0.2-py3-none-any.whl.
File metadata
- Download URL: rslearn_py-1.0.2-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b661b78e424d0f23145766e8bbf0e21bf5701e8e3ae08bdbd3216367ff1282b7
|
|
| MD5 |
6871eeef6d0c5d11d02d254400bce5fa
|
|
| BLAKE2b-256 |
191ec68f6dc81723ae911827732d3c2def328d31002e2212b9e834af15a148cf
|