correlation
- Details
- Last Updated on Friday, 18 January 2013 22:23
syntax
- corr(a, b)
- corr(a, b, partioning)
definition
- corr(a, b) results in the correlation coefficient of attribute a and b.
- corr(a, b, partioning) results in the correlation coefficient of attribute a and b, grouped by the partioning attribute. The domain unit of the resulting attribute is the values unit of the partioning attribute.
applies to
Attributes a and b with value types:
- group: Numeric
conditions
- Attributes a and b need to match with regard to their value type.
- Attributes a, b and partioning need to match with regard to their domain unit.
since version
5.15
example
1. parameter<float32> corrNrInhabitantsTemp:
expr = "corr(float32(City/NrInhabitants), City/avgDailyTemperature)";
result = -0.89948
2. attribute<float32> corrNrInhabitantsTempRegion (RegionDomain):expr =
"corr("
" 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 |
| corrNrInhabitantsTempRegion |
| null |
| null |
| null |
| null |
| null |