logo-header

 
 

covariance

syntax

definition

  1. cov(a, b) results in a parameter with the covariance of attributes a and b.
  2. cov(a, b, partioning) results in an attribute with the covariance of attributes a and b, grouped by the partioning attribute. The domain unit of the resulting attribute is the values unit of the partioning attribute.
The value type of the values unit of the resulting attribute should be configured with the value type float32 or float64.

applies to

Attributes a and b with value types:

  • group: Numeric

conditions

  1. Attributes a and b need to match with regard to their value type.
  2. Attributes a, b and partition need to match with regard to their domain unit.

since version

5.15

example

1. parameter<float32> covNrInhabitantsTemp:
expr = "cov(float32(City/NrInhabitants), City/avgDailyTemperature)";
result = -156.25

2. attribute<float32> covNrInhabitantsTempRegion (RegionDomain): expr =
"cov("
" float32(City/NrInhabitants)"
", City/avgDailyTemperature"
", City/RegionNr"
")";

 

City/NrInhabitants City/avgDailyTemperature City/RegionNr
550 12 0
525 11 1
300 null 2
500 11 1
200 14 3
175 null null
null 14 3
Table CityDomain, nr of rows = 7

covNrInhabitantsTempRegion
0
0
null
0
null
Table RegionDomain, nr of rows = 5

OBJECT VISION BV
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam
The Netherlands

tel: +31 (0)20 598 9083
fax:+31 (0)20 598 9904



Recent Wiki Changes