Patterns Part 4: How to Create a Trend Pattern?


Overview

Once you get to the pattern creation page, a trend pattern can be created using the "+ Trend" icon (1):

 

Trend pattern creation

 

which will take you to the trend pattern creation page:

 

Trend creation page

 

1. Trend pattern methods

The default trend method is the machine learning algorithm, but you may also choose the linear option as an alternative:

 

 

a. Machine learning

The machine learning trend method creates a seasonality analysis that decomposes time series data into long-term trend and seasonal components, such as daily, weekly, or yearly cycles, if applicable. Then the trend component is presented after this decomposition. For instance, if your time series data looks like:

 

Stationary time series example

 

Behind the scenes, this decomposition identifies the trend, daily, weekly, and yearly components of the data as:

 

Seasonal decomposition example

 

Then, it provides you with the trend component over the time series data:

 

Machine learning trend pattern example

 

Unlike a simple linear trend-line, this model can handle non-linear behaviours and recurring patterns, making it ideal for uncovering how a metric truly evolves. This is a second example where there is a clear downward trend in the data, but with subtle granular fluctuations:

 

Downward time series data example

 

When applying the seasonality analysis, the data is decomposed into its trend and seasonal components behind the scenes:

 

Seasonal decomposition example

 

Then, it provides you with the trend component over the time series data:

 

Downward trend example

 

b. Linear

This is the legacy linear trend functionality of the iTwin IoT platform that provides you with a one-click fast linear trend creation for simpler modeling of the time series data.

 

Linear trend example

 

2. Time range

Through this, the users can set the data time range for which the pattern should be created by configuring a custom fixed date. A one-time pattern model and pattern data are created based on this selection for a historical trend analysis of the time series data.

 

Custom time range selection

 

3. Sampling interval

Sampling interval determines how finely the data is averaged before training. 
By default, it’s set to auto, where we automatically approximate the right interval based on the sensor’s estimated logging frequency, using the data time span and number of observations. 
If you prefer, you can also set it manually by disabling the auto toggle:

 

Sampling interval

 

4. Forecast

If the user is interested in predicting the possible behaviour of the sensor into the future, this configuration allows setting the duration of the forecast, starting from now:

 

Forecast configuration

 

When the forecast is enabled, a vertical line is drawn on the graph, marking the present moment. 
Everything to the right-hand side of this line is the forecast into the future:

Forecast for a machine learning trend

 

5. Create

Once all the desired configurations are set, click on the create button at the bottom of the page to start creating the pattern. The pattern should be ready shortly, in the list view and in the graph.

 

Trend list

 

You may hide/show a pattern by clicking on the eye icon next to each pattern, edit certain fields of the pattern, or delete it using the list view.

 

Editing a pattern

You may enable or disable the forecast and/or change the forecast duration when editing a machine learning trend:

 

Edit a machine learning trend

 

Then click on "Save" to apply the changes.

Patterns Part 1: What does the Pattern tool do?

Patterns Part 2: How to Create a Pattern?

Patterns Part 3: How to Create a Regression Pattern?

Patterns Part 4: How to Create a Trend Pattern?

Patterns Part 5: How to Select a Machine Learning Regression Pattern Method?