( ce: ComputeEngine, ops: ReadonlyArray<Expression>, numericApproximation: boolean )
| 1058 | // collections, or one collection of 2-element (x, y) pairs. Dual |
| 1059 | // exact/numeric path mirroring `Variance`: all-exact data → exact |
| 1060 | // rational/radical result; otherwise machine or BigDecimal kernels. |
| 1061 | // |
| 1062 | Covariance: { |
| 1063 | description: |
| 1064 | 'Sample covariance (n − 1 denominator) of paired data, given as two ' + |
| 1065 | 'equal-length collections or one collection of (x, y) pairs.', |
| 1066 | complexity: 1200, |
| 1067 | broadcastable: false, |
| 1068 | signature: '(collection<any>, collection<any>?) -> number', |
| 1069 | typeHandlerKind: 'types', |
| 1070 | type: (ops) => pairedStatisticType(ops), |
| 1071 | evaluate: (ops, { engine: ce, numericApproximation }) => |
| 1072 | evaluateCovariance(ce, ops, !!numericApproximation, false), |
| 1073 | }, |
| 1074 | |
| 1075 | PopulationCovariance: { |
| 1076 | description: |
| 1077 | 'Population covariance (n denominator) of paired data, given as two ' + |
| 1078 | 'equal-length collections or one collection of (x, y) pairs.', |
| 1079 | complexity: 1200, |
| 1080 | broadcastable: false, |
| 1081 | signature: '(collection<any>, collection<any>?) -> number', |
| 1082 | typeHandlerKind: 'types', |
| 1083 | type: (ops) => pairedStatisticType(ops), |
| 1084 | evaluate: (ops, { engine: ce, numericApproximation }) => |
| 1085 | evaluateCovariance(ce, ops, !!numericApproximation, true), |
| 1086 | }, |
| 1087 | |
| 1088 | Correlation: { |
| 1089 | description: |
| 1090 | "Pearson's correlation coefficient of paired data, given as two " + |
| 1091 | 'equal-length collections or one collection of (x, y) pairs.', |
| 1092 | complexity: 1200, |
| 1093 | broadcastable: false, |
no test coverage detected