🚀 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
- 📈 Automated evaluations with
evaluate_model
Release & Changes
- Version : 1.1.0 - 1.0.4
- Release Date: 2026-06-26
- CHANGELOG
NOTE
tests/* will be changed for each functions after documantation update.
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)
📊 K-nearest Neighbors Models
- KNNRegressor (Single & Multi-feature)
- KNNClassifier (Binary & Multi-class)
📏 Metrics
- Mean Squared Error (MSE)
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
- R² Score
- Accuracy (for classification)
- Euclidian Distance (for KNN)
✔ 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
-
or just use
scale=Trueparameter whilefit()
🤖 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-ML/
│
├── rslearn/
│ │
│ ├── BaseEstimators/
│ │ └── __init__.py
│ │ └── _base.py
│ │ └── _estimator.py
│ │
│ ├── Errors/
│ │ ├── __init__.py
│ │ └── _errors.py
│ │
│ ├── loader/
│ │ ├── __init__.py
│ │ └── _pipeline_loader.py
│ │ └── _model_loader.py
│ │
│ ├── linear_model/
│ │ ├── __init__.py
│ │ ├── README.md
│ │ ├── _LinearRegression.py
│ │ ├── _LogisticRegression.py
│ │ └── _regulizations.py
│ │
│ ├── metrics/
│ │ ├── __init__.py
│ │ ├── README.md
│ │ ├── _evaluations.py
│ │ ├── regression_readme.md
│ │ ├── evaluation.md
│ │ ├── classification_readme.md
│ │ ├── _classification.py
│ │ ├── _distances.py
│ │ └── _regression.py
│ │
│ ├── model_selection/
│ │ ├── __init__.py
│ │ ├── README.md
│ │ └── _split.py
│ │
│ ├── neighbors/
│ │ ├── __init__.py
│ │ ├── README.md
│ │ ├── _knnClass.py
│ │ └── _knnReg.py
│ │
│ ├── Pipeline/
│ │ ├── __init__.py
│ │ ├── README.md
│ │ └── _pipeline.py
│ │
│ ├── preprocessing/
│ │ ├── __init__.py
│ │ ├── README.md
│ │ └── _scaler.py
│ │
│ └── __init__.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
import rslearn
from rslearn.linear_model import LinearRegression
import numpy as np
print(rslearn.__version__)
X = np.array([10, 20, 30])
y = np.array([5, 10, 15])
model = LinearRegression()
model.fit(X, y, scale=True) # Auto Scale if True, else Gradient Stability Backend
print(model.predict([40]))
📚 Documentation
-
Each folder includes its own README.md
-
Covers:
- Usage
- Parameters
- Examples
- Internal working
Good ForDevelopers&Contributors
User Guide
🧑💻 Author
ItzRustam
🔨 Origination
rslearn-lib
📜 License
This project is licensed under the GNU GPL v3 License.
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.4.tar.gz.
File metadata
- Download URL: rslearn_py-1.0.4.tar.gz
- Upload date:
- Size: 43.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12d1a027f5a952debe08acfc3fbf26c88d97b5a2cc81116d609cf801bcae2ab5
|
|
| MD5 |
2185b1133698f7d4ca6dc59939731608
|
|
| BLAKE2b-256 |
f01a79411fec3016c0ffccf52c8603a17938fc79970833cddd7602374bbd244d
|
File details
Details for the file rslearn_py-1.0.4-py3-none-any.whl.
File metadata
- Download URL: rslearn_py-1.0.4-py3-none-any.whl
- Upload date:
- Size: 57.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b12c78c2a8ca907742847ca796c92a38ef69fd84ee2853e965fefd18c78a436
|
|
| MD5 |
45e36c8931e2e5a4700bed4b9b14eda3
|
|
| BLAKE2b-256 |
45d764e9d04538e71102c82900cc0bb78ddcc97f565a15db912d54c84ae398de
|