... | ... | @@ -67,7 +67,7 @@ The response of the submitted command is a JSON object containing the forecasted |
|
|
|
|
|
## Energy Forecasting Example
|
|
|
|
|
|
In this example we want to predict Energy Consumption of the [Sbeamer Gapbs](https://github.com/sbeamer/gapbs) test project for 5 steps ahead. Sbeamer Gapbs dataset contains 60 versions, so we expect the response to contain predicted TD values for versions 61 to 65. Again, we set the *horizon* parameter to *5* and the *regressor* parameter to *auto*, in order to allow the Energy Forecaster to choose the best model based on training error minimization.
|
|
|
In this example we want to predict Energy Consumption of the [Sbeamer Gapbs](https://github.com/sbeamer/gapbs) test project for 5 steps ahead. Sbeamer Gapbs dataset contains 60 versions, so we expect the response to contain predicted Energy values for versions 61 to 65. Again, we set the *horizon* parameter to *5* and the *regressor* parameter to *auto*, in order to allow the Energy Forecaster to choose the best model based on training error minimization.
|
|
|
|
|
|
Once the server is running, open your web browser and navigate to the following URL:
|
|
|
|
... | ... | @@ -111,3 +111,70 @@ The response of the submitted command is a JSON object containing the forecasted |
|
|
"status": 200
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## Dependability Forecasting Example
|
|
|
|
|
|
In this example we want to predict Security Index of the [Square Retrofit](https://github.com/square/retrofit) test project for 10 steps ahead. Square Retrofit dataset contains 100 versions, so we expect the response to contain predicted Security Index values for versions 101 to 110. Again, we set the *horizon* parameter to 10 and the *regressor* parameter to *auto*, in order to allow the Dependability Forecaster to choose the best model based on training error minimization.
|
|
|
|
|
|
Once the server is running, open your web browser and navigate to the following URL:
|
|
|
|
|
|
http://127.0.0.1:5000/ForecasterToolbox/DependabilityForecasting?horizon=10&project=square_retrofit_security_measures®ressor=auto&ground_truth=no&test=no
|
|
|
|
|
|
The response of the submitted command is a JSON object containing the forecasted Security Index values of the Square Retrofit test project for versions 101 to 110 (10 steps) ahead, using the Ridge regressor, which the back-end selected as the most appropriate model for this occasion. This JSON object is illustrated below:
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"message": "The request was fulfilled.",
|
|
|
"results": {
|
|
|
"forecasts": [{
|
|
|
"value": 0.5873630344782443,
|
|
|
"version": 101
|
|
|
},
|
|
|
{
|
|
|
"value": 0.5873872305014517,
|
|
|
"version": 102
|
|
|
},
|
|
|
{
|
|
|
"value": 0.5873851825549331,
|
|
|
"version": 103
|
|
|
},
|
|
|
{
|
|
|
"value": 0.5873899738434318,
|
|
|
"version": 104
|
|
|
},
|
|
|
{
|
|
|
"value": 0.5873912182152962,
|
|
|
"version": 105
|
|
|
},
|
|
|
{
|
|
|
"value": 0.5873911908894475,
|
|
|
"version": 106
|
|
|
},
|
|
|
{
|
|
|
"value": 0.5873845169066217,
|
|
|
"version": 107
|
|
|
},
|
|
|
{
|
|
|
"value": 0.5874247533300624,
|
|
|
"version": 108
|
|
|
},
|
|
|
{
|
|
|
"value": 0.5874660119523348,
|
|
|
"version": 109
|
|
|
},
|
|
|
{
|
|
|
"value": 0.5875627761835703,
|
|
|
"version": 110
|
|
|
}
|
|
|
],
|
|
|
"parameters": {
|
|
|
"ground_truth": "no",
|
|
|
"horizon": 10,
|
|
|
"project": "square_retrofit_security_measures",
|
|
|
"regressor": "ridge",
|
|
|
"test": "no"
|
|
|
}
|
|
|
},
|
|
|
"status": 200
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |