Downloads · 30 days
0
Varma2905/regression-linear
regression-linear is a machine learning model from Varma2905. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is designed for generic regression datasets and is not restricted to the Tetuan City Power Consumption dataset. It is a reusable regression workflow: retrain it on your own tabular data by calling trainandp…
Downloads · 30 days
0
Access
Public
Updated Aug 24, 2026
Repo size
975 KB
Likes
0
Public
Click a slice to open those files.
.png485 KB · 96%
From the Hugging Face model README
This model is designed for generic regression datasets and is not restricted to the Tetuan City Power Consumption dataset. It is a reusable regression workflow: retrain it on your own tabular data by calling train_and_predict(data=your_df, target_column="your_target") from regression_model.py.
Model type: tabular_regression
Task: regression
Framework: scikit-learn
handle_unknown="ignore", so unseen categories at inference time don't crash).train_and_predict(data=df, target_column="...").regression_model.py -- the reusable implementation (GenericRegressionModel, train_and_predict). Import this and call it on your own data.model.joblib -- a demo artifact fit on the Tetuan City power consumption dataset (development/testing only). Its learned coefficients are specific to THAT dataset's feature space and will not work on a dataset with different columns -- retrain via regression_model.py for your own data instead.metrics.json / metadata.json -- evaluation results from the development-dataset run and the synthetic generic-dataset validation.{"copy_X": true, "fit_intercept": true, "n_jobs": null, "positive": false}| Metric | Value |
|---|---|
| MAE | 3416.8772 |
| MSE | 19319221.1505 |
| RMSE | 4395.3636 |
| MedianAbsoluteError | 2689.5062 |
| MaxError | 18730.4598 |
| R2 | 0.5569 |
| ExplainedVariance | 0.5570 |
| MAPE | 20.7361 |
| MSLE | 0.0605 |
| RMSLE | 0.2459 |
| AdjustedR2 | 0.5569 |
| PearsonCorrelation | 0.7463 |
| SpearmanCorrelation | 0.7468 |
Passed: True. Verified with a synthetic sklearn.datasets.make_regression dataset (different columns, feature count, and distribution) -- not uploaded here, but proving train_and_predict() is not hard-coded to any one dataset.
model.joblib is a demo fit on one specific dataset's feature space -- it will raise a clear error if given data with different feature columns. Use regression_model.py to retrain on your own data instead.metadata.json -> statistical_summary.import pandas as pd
from regression_model import train_and_predict
df = pd.read_csv('your_dataset.csv')
result = train_and_predict(data=df, target_column='your_target_column')
model = result['model']
print(result['predictions'][:5])
# Predict on brand-new rows with the same feature columns:
new_predictions = model.predict(new_df)