Models

This article applies to versions 4.7 and later of P2 Explorer.

The Analysis panel in the Explorer Trend extends the capabilities of the trend to enable the creation and visualization of complex models directly against any timeseries data in the system.

The first models that have been provided are line fitting methods (linear, polynomial, and logarithmic). These will be expanded to include many other types of models.

When an analysis has been created and is saved, the output of the model is saved as a data tag.

These tags can be used anywhere in the system where datasource tags are used, such as in calculations, on dashboards, or in Sentinel monitors. As an analysis is saved as a tag, you can also add comments to them.

The Analysis panel offers a 3-step process to training and executing an analysis.

 


Opening the Analysis Panel

The Analysis button in the toolbar allows you to toggle the Analysis panel on and off.

If this is a newly opened trend, you can start creating your model analysis right away.

You can add a new analysis in two other ways:

  • Directly from the Trace Table by clicking the + button.

  • From the Models tab of the Analysis panel.

 


Model Type

When adding a new analysis, first choose the model type. There are 3 default model types available: Linear, Logarithmic, and Polynomial.

After choosing a model type, you can easily change it by clicking the Change link.

 


Effective Range

Effective Range allows you to specify the period of time for which this analysis is valid. You can specify the exact dates manually, or you can use a hairline to provide the dates. There is also the option to use the start time (ST) or the end time (ET) of the Trend (i.e. the times at the far left or the far right of the x-axis).

1. Select the 'Set Effective Range' check box.

2. Both Effective Start and Effective End must have a date selected. You can either:

- Choose a specific date/time using the date picker: click the calendar  icon to open the date picker, choose a date and time, and then click Apply.

- Use the hairline control to specify the date/time of a hairline (click H1, H2 etc), or the visible start time (ST) or visible end time (ET) of the trend.

 


Training

The Training section is where you provide the data and the date range against which you want to train the model.

1. In the Data field, type the name of a tag or entity attribute and select the correct one from the list. 

Note: You can use any tag or entity data item here, it does not need to be added to the trend in order for training to occur, although it's often useful to see the tag and analysis side by side.

2. If you would like to exclude statistically irrelevant data points, there are two filters that provide this capability: Standard Deviation and Interquartile Range. These filters provide an easy way to exclude data outliers and ensure that only clean data is used in training. Select the check boxes if required.

3. As with Effective Range, you can specify the training dates manually, or you can use a hairline to provide the dates.

4. When you have finished setting up your training parameters, click the Train icon in the section header.

When training has completed, you will notice three things:

  • Model Parameters is filled in.
  • A new trace is added to the trend, called 'New Analysis' - this is an ad hoc trace and will not be saved if the trend is saved at this point.

  • A range of statistics have been calculated for the model.

 


Model Parameters

The model parameters provide an opportunity to modify the polynomial coefficients after training, before executing the model. This provides a way to manipulate the data to determine the best result before executing the analysis.

The available parameters depend on the model selected.

In this section, you can:

  • Adjust the coefficients to try and get a better fit for your analysis. After changing one of the coefficients, click the Execute icon to see the change reflected in the trend.
  • Remove the analysis trace from the trend, but retain the inputs in the side panel. To do this, click the Clear icon. This has the same effect as clicking the bin icon in the trace table. To add the line back in, click Train or Execute again.

 


Analysis Trace

The analysis trace initially appears as a dashed black line during training or editing:

However you may change the colour and style to suit.

When you drag and drop the saved analysis tag, it appears as a normal trace, and has an attribute of Actual:

 

You can open the Point Detail for the analysis, which will show you the underlying information and commentary. The Analysis tag inherits min and max and some other values from the underlying tag.   

 


Saving the Analysis

To save your trained analysis:

1. Click the Save Analysis button at the bottom of the New Analysis panel. The name will be pre-populated with the name of the tag and 'Analysis' at the end.

2. Change the Name to whatever you wish (note that the standard reserved characters apply).

3. Fill in the Description field if desired.

4. Click Save and Continue.

The analysis is saved as a tag, and the name and description in the trace table will change accordingly. 

 


Edit an Analysis

You can edit an existing analysis in two ways:

  • From the trend trace table, click the pencil icon.

 

  • From the analysis panel, click the pencil icon next to the analysis name.

Comments are closed