Analytics Builder 10.14.0 | Using Analytics Builder for Cumulocity IoT | Block Reference | Aggregate | Gradient
 
Gradient
apama.analyticskit.blocks.core.Gradient
Calculates the weighted linear regression gradient for the values.
A gradient measures the rate of change of a value over time. A positive gradient indicates an increase of the input values, and a negative gradient indicates a decrease of the input values. The magnitude of the gradient signifies the scale of change.
The block can operate over a time-bounded window that is specified with the Window Duration parameter. If this parameter is not specified, it uses an unbounded window and the block re-evaluates for every 1 second, and will use 1-second buckets. If a window is configured, the block will use a set of 20 buckets, so the time of expired values is an approximation to the nearest bucket interval. The first gradient output is generated only when a minimum of two buckets is available for computation.
The Reset input clears the content of the window. Sample input can be used to force re-evaluation and generate the latest value.
Parameters
Name
Description
Type
Notes
Window Duration (secs)
If present, the amount of time (in seconds) for which values are to be kept in the window.
This must be a finite and positive number.
float
Optional
Input Port Details
Name
Description
Type
Value
The input value for which the gradient is to be calculated.
float
Reset
Clears the content of the window.
pulse
Sample
Forces re-evaluation of the current value and sends the output.
pulse
Output Port Details
Name
Description
Type
Gradient
The gradient of the input values.
float