Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Creating Holt Winters Forecasts

ripienaar edited this page Oct 16, 2011 · 2 revisions

This is a swiss-army knife for making prediction graphs using the new Holt Winters functionality in Graphite 0.9.9

The sample is created using the most basic forecast helper:

    forecast :male, :data => "sumSeries(*.site.users.male)",
                    :alias => "Male"

basic.png

In the sample graph the yellow line is actual numbers. The blue line is the forecasted line and the grey lines are the confidence lines. Real data within the confidence lines can be considered within predicted boundaries.

But there are many tweaks you can do or combine:

The following adds a 4th line to the graph that shows how far the data is deviating from the confidence lines (basic-with-aberration):

    forecast :male, :data => "sumSeries(*.site.users.male)",
                    :alias => "Male",
                    :aberration_line => true

basic-with-aberration.png

For high number data with small aberrations like the graph above it might be useful to put the aberration line on the 2nd y access (basic-with-aberration-on-y), this graph is a lot more readable and the aberrations is clearer:

    forecast :male, :data => "sumSeries(web*.site.users.male)",
                    :alias => "Male",
                    :aberration_line => true,
                    :aberration_second_y => true

basic-with-aberration-on-y.png

You can disable any of the lines, this will only draw the aberration line (just-aberration):

    forecast :male, :data => "sumSeries(web*.site.users.male)",
                    :alias => "Male",
                    :aberration_line => true,
                    :forecast_line => false,
                    :bands_lines => false,
                    :actual_line => false

just-aberration.png

The data itself might be confusing and so you might wanted to draw just the aberration line and lines for critical and warning thresholds (aberration-with-thresholds):

    forecast :male, :data => "sumSeries(web*.site.users.male)",
                    :alias => "Male",
                    :aberration_line => true,
                    :forecast_line => false,
                    :bands_lines => false,
                    :actual_line => false,
                    :critical => [700, -700],
                    :warning => [300, -300],
                    :aberration_color => "blue"

aberration-with-thresholds.png

And finally all the colors are adjustable (custom-colors):

    forecast :male, :data => "sumSeries(web*.site.users.male)",
                    :alias => "Male",
                    :forecast_color => "yellow",
                    :bands_color => "white",
                    :color => "green"

custom-colors.png

Clone this wiki locally