MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / evaluatePolynomialFit

Function evaluatePolynomialFit

src/compute-engine/library/statistics.ts:1060–1090  ·  view source on GitHub ↗
(
  ce: ComputeEngine,
  ops: ReadonlyArray<Expression>,
  numericApproximation: boolean
)

Source from the content-addressed store, hash-verified

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,

Callers 1

statistics.tsFile · 0.85

Calls 6

parseFitArgsFunction · 0.85
fitCoefficientsFunction · 0.85
buildPolynomialFunction · 0.85
errorMethod · 0.65
functionMethod · 0.65
isIntegerMethod · 0.45

Tested by

no test coverage detected