Skip to content

Correlation

mtbeek32 edited this page Jan 2, 2023 · 12 revisions

Aggregation functions correlation

syntax

  • corr(a, b)
  • corr(a, b, relation)

definition

The value type of the resulting data item is float32 or float64.

applies to

conditions

  1. The value type of the arguments a and b must match.
  2. The domain of arguments a, b and relation must match.

example

parameter corrNrInhabitantsTemp                := corr(float32(City/NrInhabitants), City/avgDailyTemperature); result = -0.89948 attribute corrNrInhabitantsTempRegion (Region) :=     corr(        float32(City/NrInhabitants)       ,City/avgDailyTemperature       ,City/RegionNr    );

City/NrInhabitants City/avgDailyTemperature City/Region_rel
550 12 0
525 11 1
300 null 2
500 11 1
200 14 3
175 null null
null 14 3

domain City, nr of rows = 7

corrNrInhabitantsTempRegion
null
null
null
null
null

domain Region, nr of rows = 5

Clone this wiki locally