-
Notifications
You must be signed in to change notification settings - Fork 2
/
ml-airpls.d.ts
41 lines (40 loc) · 980 Bytes
/
ml-airpls.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
declare module 'ml-airpls' {
export interface AirPLSOptions {
/**
* @default 100
*/
maxIterations?: number;
/**
* @default 100
*/
lambda?: number;
/**
* @default 0.001
*/
factorCriterion?: number;
/**
* array of number to weight the baseline. by default all point has the same weight.
*/
weights?: number[],
/**
* array of indexes of points that should have the maximum weight on each iteration.
* @default []
*/
controlPoints?: number[],
/**
* array of indexes of points that should have the maximum weight on each iteration.
* @default []
*/
baseLineZones?: Array<{from: number, to: number}>,
}
export default function airPLS(
x: number[] | Float64Array,
y: number[] | Float64Array,
options?: AirPLSOptions,
): {
corrected: number[] | Float64Array,
baseline: number[] | Float64Array,
iteration: number,
error: number
};
}