regel / loudml

Loud ML is the first open-source AI solution for ICT and IoT automation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

predicted weekly demand skewed by one day

andycarlsonuk opened this issue · comments

I've recently set up a loudml model to forecast demand on a system that I work on.

I trained it with data for one calendar month - 1st to 30th August.

Forecasting for October I see that it has predicted the shape of the 7 day variation in our usual demand curve quite nicely... with one problem - the curve is 1 day behind where it should be. 11th Oct was a Sunday for example and should have the smallest daytime demand peak but the forecast has the smallest peak on Monday 12th.

weekly-demand

My model json is below. The data store is influxdb and the input measurement is the hourly total HTTP elapsed time across all servers. The 'mean_' prefix for the feature name is misleading - sorry about that.

{
    "default_bucket": "barprod",
    "name": "http_conc_foo",
    "type": "donut",
    "features": [
        {
            "name": "mean_http_secs",
            "metric": "sum",
            "field": "http_total_secs",
            "measurement": "time_model",
            "match_all": [
                {"tag": "instance", "value": "foo.com"}
            ],
            "anomaly_type": "low_high",
            "default":0 
        }
    ],
    "run": {
        "detect-anomalies": true,
        "datasink": "loudmlout"
    },
    "bucket_interval": "1h",
    "interval": "1h",
    "offset": "2h",
    "max_evals": 10,
    "forecast": 24,
    "seasonality": {
        "daytime": true,
        "weekday": true
    },
    "span": 24
}

Thanks in advance.

I should have said earlier that the forecasting was done in 1 day chunks.

I've tried modifying 'forecast' in the json to 170 (1 week), dropping the forecast output data from influxdb and then forecasting in bigger chunks. With a 2 day forecast chunk the forecast profile lags the day of week by 2 days.

At the moment the model seems to be replaying a crude 'echo' of the actual value from 1 or 2 days previously. When there are anomalies in the actuals these also produce an 'echo' in the forecast.

eval-model does not seem to show the same 'echo' behaviour and the 'forecast' profile fits with the expected pattern for the day of the week.