This project implements a system for predicting the number of virtual machines (VMs) to deploy based on the day of the week and the hour of the day.
It trains multiple regression models, evaluates their performance, and automatically selects the best model using a PROMETHEE-like multi‑criteria decision method.
- Loads dataset containing:
day ; hour ; nb_machine - Trains multiple regression models:
- Linear Regression
- Ridge Regression
- Lasso Regression
- Random Forest
- Support Vector Regressor (SVR)
- Gradient Boosting Regressor
- Evaluates models using RMSE, MAE, R²
- Selects the best model through a PROMETHEE-like scoring method
- Saves the best model as
best_model.joblib - Generates predictions for 7×24 hours →
out_prediction_one_week.csv
git clone https://github.com/CGI-FR/fogSLAAntillas.git
cd fogSLAAntillas
pip install -r requirements.txtRequires:
pandas, scikit-learn, joblib
| day | hour | nb_machine |
|---|---|---|
| 0 | 13 | 5 |
| 0 | 14 | 7 |
| ... | ... | ... |
Separator: ;
python CGI_Prediction_Model.py data.csvOutputs:
best_model.joblibout_prediction_one_week.csv
- Loads dataset from CSV
- Splits training/testing sets
- Trains all regression models
- Computes RMSE, MAE, R²
- Selects best model with PROMETHEE-like method
- Saves best model
- Generates one-week hourly predictions
from joblib import load
import CGI_Prediction_Model as cgi
model = load("best_model.joblib")
prediction = cgi.predict_vms(2, 15, model)
print("Predicted VMs:", prediction[0])| day | hour | nb_machine |
|---|---|---|
| 0 | 0 | 4 |
| 0 | 1 | 4 |
| ... | ... | ... |
BSD-3 License