Instructions to use Varma2905/linear-regression-tetuan-power with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Varma2905/linear-regression-tetuan-power with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Varma2905/linear-regression-tetuan-power", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
linear-regression-tetuan-power
Model Name
linear-regression-tetuan-power — Linear Regression (Phase 1)
Algorithm
sklearn.linear_model.LinearRegression (ordinary least squares), trained with
scikit-learn 1.6.1. No other regression algorithm is used in
this model.
Training Information
- Dataset: Tetuan City power consumption dataset (development data only; the deployed model is not tied to this dataset's specific values, only its feature schema).
- Rows used for development: 44553 (of 52416 total, after validation/cleaning); 7863 rows were held out and never seen during training.
- Train/test split: 80% / 20%,
random_state=42. - Train samples: 35642
- Test samples: 8911
Input Format
A pandas DataFrame (or 2D array) with these numeric columns, in this order:
TemperatureHumidityWind Speedgeneral diffuse flowsdiffuse flows
Target Format
A single numeric column: Zone 1 Power Consumption (float, same units as the
training target).
Evaluation Metrics
Computed on a held-out 20% test split from the development pool (never used in training):
| Metric | Value |
|---|---|
| MAE | 5119.2703 |
| MSE | 39281693.2639 |
| RMSE | 6267.5109 |
| MAPE | 0.1658 |
| R² | 0.207988 |
| Adjusted R² | 0.207543 |
How to Download the Model
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(
repo_id="YOUR_USERNAME/linear-regression-tetuan-power",
filename="linear_regression.joblib",
)
How to Load the Model
import joblib
model = joblib.load(model_path)
Example Prediction
import pandas as pd
sample = pd.DataFrame([{
'Temperature': 0.0,
'Humidity': 0.0,
'Wind Speed': 0.0,
'general diffuse flows': 0.0,
'diffuse flows': 0.0,
}])
prediction = model.predict(sample)
print(prediction)
Do not retrain this downloaded model — it is provided purely for
inference. See test_downloaded_model.ipynb in this repository for a full
download -> load -> predict -> evaluate example on a different CSV dataset.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support