Scan_RangeQuery_Pearson_Correlation function

The Scan_RangeQuery_Pearson_Correlation function returns time series data that matches a pattern using a Pearson correlation.

Syntax

Scan_RangeQuery_Pearson_Correlation (
                 ts                  TimeSeries,
                 ident               LVARCHAR,
                 col_name            LVARCHAR,
                 begin_tstamp        DATETIME YEAR TO FRACTION(5),
                 end_tstamp          DATETIME YEAR TO FRACTION(5),
                 pattern             LIST (ROW (DOUBLE PRECISION) NOT NULL),                         
                 lower_bound         DOUBLE PRECISION) 
RETURNS LIST (SEARCHROW NOT NULL)
ts
The time series value for the specified primary key.
ident
A string identifier that is associated with the time series instance.
col_name
The name of the column in the TimeSeries data type from which to retrieve the values.
begin_stamp
The begin point of the range to search. Can be NULL, which represents the first element in the time series.
end_stamp
The end point of the range to search. Can be NULL, which represents the last element in the time series.
pattern
A search pattern that is returned by the ValueAsCollection or TSGetValueList function.
lower_bound
A number that represents the lower bound of similarity as calculated by the Pearson Correlation function. Range of values is 0.0 - 1.0.

Usage

Run the Scan_RangeQuery_Pearson_Correlation function to find fragments in a sliding windows that match the search pattern using a Pearson correlation coefficient formula to calculate the lower bound. See Pearson correlation coefficient.

Returns

A list of matches in a LIST data type that contains a SEARCHROW data type value for each match. See Scanning functions.