Skip to content

Commit ef2290e

Browse files
authored
Merge pull request #270 from VisActor/fix/alpha
Fix/alpha
2 parents 97575cd + e455c43 commit ef2290e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@visactor/vutils",
5+
"comment": "typo fixed: alpah --> alpha",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@visactor/vutils"
10+
}

packages/vutils/src/common/regression-polynomial.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ export function regressionPolynomial(
6969
data: any[],
7070
x: (d: any) => number = d => d.x,
7171
y: (d: any) => number = d => d.y,
72-
options: { degree?: number; alpah?: number } = {}
72+
options: { degree?: number; alpha?: number } = {}
7373
) {
7474
let degree = options.degree ?? 0;
7575
if (degree < 0) {
7676
degree = 0;
7777
}
78-
const alpha = options.alpah ?? 0.5;
78+
const alpha = options.alpha ?? 0.05;
7979
const m = degree + 1;
8080
const sums: number[] = new Array(2 * degree + 1).fill(0);
8181

0 commit comments

Comments
 (0)