Skip to content
This is an archived version of the documentation downloaded from LogScale Documentation Archives. Up to date documentation, and documentation for later versions, is available on LogScale Documentation

## `holtwinters()`

### Removed: 1.73

The `holtwinters()` function has been removed from the product.

Used to generate a trendline for a periodic dataset. The key parameter period specifies the length of the period to be applied. This is used after a `Time Chart` , as in:

logscale Syntax

    timeChart(...)
    | holtwinters(1week)

The function implements triple exponential smoothing, and adds an extra graph for every series in the graph. The computation assumes periodic data set (the period parameter specifies the length of the period), such as daily or weekly traffic measurements. The function works best when the timecharts span (width of each bucket) is a multiple of the period, as the smoothing is done in units of the buckets.

For example, a 30 day chart with a 7 day period would have 4 periods from day 2 to 30 (the first 2 days being ignored). Based on this, the first 3 periods (in this case period 1, 2 and 3) are fed into the smoothing/forecast computation, producing a "forecast" for the fourth period. Smoothing data for period 2, 3 and 4 are emitted, the last period being entirely computed.

Parameter | Type | Required | Default Value | Description
--- | --- | --- | --- | ---
`alpha` | number | optional[a] |  | Data smoothing factor in the interval [0..1].
`beta` | number | optional[a] |  | Trend smoothing factor in the interval [0..1].
`gamma` | number | optional[a] |  | Seasonal change smoothing in the interval [0..1].
`period`[b] | string | required |  | Defines the trend's period, such as 1week or 1day — see the full list of the allowed time periods at Relative Time Syntax.
[a] Optional parameters use their default value unless explicitly set. [b] The parameter name `period` can be omitted.

Hide omitted argument names for this function

Show omitted argument names for this function

> Omitted Argument Names

> The argument name for `period` can be omitted; the following forms of this function are equivalent:

> logscale Syntax

>     holtwinters("value")

> and:

> logscale Syntax

>     holtwinters(period="value")

> These examples show basic structure only.

### `holtwinters()` Examples

Show event count graph with daily aggregates and compute the weekly trend.

logscale

    timeChart(function=count(), span=1d)
    | holtwinters(period=7d)

#### Enter search term