Skip to content

← statistics package

LinearTrend

Calculate the linear trend over a given axis.

If there are additional axes in the packet, a separate trend will be computed for each element in the other axes. All non-trend axes are passed through unchanged in the output, with independent regressions computed for each combination of elements across these axes. (Note: This node is optimized for cases 1 or 2 axes, but handles any number of axes.) Output formats: - Slope port: Contains a packet with the same axes as input except the trend_axis is removed. Data contains the slope coefficient for each element. - Intercept port: Contains a packet with the same axes as input except the trend_axis is removed. Data contains the intercept coefficient for each element. - Trendline port: Contains a packet with the same axes as input. Data contains the fitted regression line values. - Stats port: Contains a packet with two FeatureAxis dimensions plus any remaining axes from input. First FeatureAxis has labels ['Intercept', 'Slope'] with custom_label 'explanatory_variables'. Second FeatureAxis has labels ['value', 'p', 'R', 'RSq', 'RSqAdj', 'F'] with custom_label 'statistic_types', containing regression statistics for each coefficient. Version 1.2.0

Ports/Properties

data

Incoming data.

verbose name
Data
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
IN

slope

Slope.

verbose name
Slope
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
OUT

trendline

Regression trend line.

verbose name
Trendline
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
OUT

intercept

Intercept.

verbose name
Intercept
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
OUT

stats

Regression statistics.

verbose name
Stats
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
OUT

trend_axis

A linear trend is calculated along each element in this axis.

verbose name
Trend Axis
default value
time
port type
ComboPort
value type
str (can be None)

x_coordinate

The location from which the values along the X axis should be extracted. If auto, the most logical values for the selected trend_axis will be used (times for time axis, frequencies for frequency axis, etc.). If time, will force the use of the times field, if it exists in the axis (primarily for use with the instance axis). If indices, will not use any values from the trend_axis but instead will add one sequential integer for each element along that axis (this can be used with the instance axis, and is the default if auto is selected and the trend_axis is instance).

verbose name
X Coordinate
default value
auto
port type
EnumPort
value type
str (can be None)

use_caching

Enable caching.

verbose name
Use Caching
default value
False
port type
BoolPort
value type
bool (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)