RegressionMadeSimple
A minimalist machine learning backdoor to sklearn. Just import and go.
v3.0.0 - Latest Release🎉 What's New in v3.0.0
- Model Registry: Access models via
rms.models.Linear,rms.models.Quadratic, etc. - Model Serialization: Save and load trained models with
save_model()andload_model() - Enhanced Metrics: New scoring methods including
r2_score(),mae(), andrmse() - Better Architecture: Eliminated ~60% of duplicate code through enhanced base class
- Type Hints: Comprehensive type annotations for better IDE support
Quick Start
pip install regressionmadesimple
import regressionmadesimple as rms
import pandas as pd
# Load your data
data = pd.DataFrame({
'x': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
'y': [2.1, 4.2, 6.1, 8.3, 10.2, 12.1, 14.3, 16.2, 18.1, 20.3]
})
# New v3.0.0 API (recommended)
model = rms.models.Linear(data, 'x', 'y')
# Make predictions
predictions = model.predict([[11], [12]])
# Get comprehensive metrics
summary = model.summary()
print(f"R² Score: {summary['r2_score']:.4f}")
print(f"RMSE: {summary['rmse']:.4f}")
# Save model for later use
model.save_model('my_model.pkl')
Key Features
🎯 Simple API
Intuitive interface that wraps scikit-learn complexity. Perfect for rapid prototyping and learning.
📊 Multiple Models
Linear, Quadratic, Cubic regression, and custom curve fitting with flexible basis functions.
💾 Model Persistence
Save and load trained models easily with built-in serialization support.
📈 Rich Metrics
Comprehensive evaluation with R², MAE, RMSE, and MSE out of the box.
🎨 Visualization
Built-in plotting support for both Plotly and Matplotlib backends.
⚙️ Configurable
Global options system for customizing defaults across all models.