🚀 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.1 - 1.0.5
- Release Date: 2026-08-20
- 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__)
print(rslearn.__github_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.
Metadata
Release files for rslearn-py 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rslearn_py-1.0.5.tar.gz | 43.2 kB | Without provenance | Details for rslearn_py-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rslearn_py-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for rslearn_py-1.0.5-py3-none-any.whl |
Total release size: 101.7 kB
Release files / rslearn_py-1.0.5.tar.gz
| Download URL | rslearn_py-1.0.5.tar.gz |
|---|---|
| Size | 43.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5e24eee084560224671956c1eca688d8693eec18b5f323d073801e290e0cd3c
|
|
BLAKE2b-256 checksum How to use checksums |
3b8ce1aad12ca10e5f2b5bd1c743fc7896bc017dd3954f9327625f14814eb35f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / rslearn_py-1.0.5-py3-none-any.whl
| Download URL | rslearn_py-1.0.5-py3-none-any.whl |
|---|---|
| Size | 58.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7696fed5403dc83c146f2ab3d74421c9b031306640dc352e9a6996dd54a976de
|
|
BLAKE2b-256 checksum How to use checksums |
f07d1a0fd3f40023aa4db02b6d060048024eb85d394098c3c996d5f1449da7ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for rslearn-py 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.