Instructions to use noracodes/water-tank-consumption-random-forest with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use noracodes/water-tank-consumption-random-forest with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("noracodes/water-tank-consumption-random-forest", "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
Water Tank Consumption Random Forest
This model predicts hourly household water consumption in liters.
Model
- Algorithm:
RandomForestRegressor - Number of trees:
200 - Maximum depth:
12 - Minimum samples per leaf:
5
Input features
hourday_of_weekis_weekendlag_1_hourlag_2_hourslag_24_hourslag_168_hoursaverage_previous_3_hoursaverage_previous_24_hours
Output
Predicted consumption in liters/hour.
Training data
- Dataset: HSB Living Lab Water Consumption Dataset
- Apartment:
APT_017 - Period: September 2020 to August 2021
- Resolution: hourly
- Source: https://zenodo.org/records/18971107
The source dataset is licensed under CC BY 4.0.
Evaluation
| Method | One-hour test MAE |
|---|---|
| Seven-day baseline | 11.622 L/hour |
| Linear Regression | 11.947 L/hour |
| Random Forest | 10.981 L/hour |
24-hour forecasting
| Method | Daily MAE |
|---|---|
| Seven-day baseline | 43.00 L/day |
| Random Forest | 42.95 L/day |
Random Forest improved one-hour predictions, but the two methods were effectively tied for recursive 24-hour forecasting.
Limitations
- Trained using only one anonymized Swedish apartment.
- Not validated using the final ESP32 hardware.
- Requires 168 hours of historical consumption.
- May not generalize to other households.
- Not suitable for confirming water leaks.
- Leak-detection experiments were not sufficiently reliable.
Files
model.skops: trained modelmetadata.json: features, configuration, and metricsexample_input.json: example model inputrequirements.txt: required package versions
Intended use
Educational smart water-tank forecasting and experimentation.
- Downloads last month
- -