Skip to main content

math:correlation

Version: 0.0.0

Description​

Takes two fields and a weighting and computes their correlation: aMb/(||aMa||.||bMb||). If several b fields are provided (via a fields container), correlation is computed for each of them.

Inputs​

InputNameExpected type(s)Description
Pin 0
Required
fieldAfield, double, vector<double>Field a. The reference field.
Pin 1
Required
fieldBfield, fields_containerField b. If a fields container is provided, correlation is computed for each field.
Pin 2
Required
weightsfield, fields_containerField M, optional weighting for correlation computation.
Pin 3
Required
absoluteValueboolIf true, correlation factor is

Outputs​

OutputNameExpected type(s)Description
Pin 0fieldfieldCorrelation factor for each input field b.
Pin 1indexint32If several b are provided, this output contains the index of the highest correlation factor.

Configurations​

NameExpected type(s)Default valueDescription
mutexboolfalseIf this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.

Scripting​

Category: math

Plugin: core

Scripting name: correlation

Full name: math.correlation

Internal name: correlation

License: any_dpf_supported_increments

Changelog​

  • Version 0.0.0: Initial release.