-
Notifications
You must be signed in to change notification settings - Fork 17
/
fit_curve.json
90 lines (90 loc) · 3.35 KB
/
fit_curve.json
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
"id": "fit_curve",
"summary": "Curve fitting",
"description": "Use non-linear least squares to fit a model function `y = f(x, parameters)` to data.",
"categories": [
"arrays",
"math"
],
"experimental": true,
"parameters": [
{
"name": "data",
"description": "A labeled array, the labels correspond to the variable `y` and the values correspond to the variable `x`.",
"schema": {
"type": "array",
"subtype": "labeled-array",
"items": {
"type": "number"
}
}
},
{
"name": "parameters",
"description": "Defined the number of parameters for the model function and provides an initial guess for them. At least one parameter is required.",
"schema": {
"type": "array",
"minItems": 1,
"items": {
"type": "number"
}
}
},
{
"name": "function",
"description": "The model function. It must take the parameters to fit as array through the first argument and the independent variable `x` as the second argument.\n\nIt is recommended to store the model function as a user-defined process on the back-end to be able to re-use the model function with the computed optimal values for the parameters afterwards.",
"schema": {
"type": "object",
"subtype": "process-graph",
"parameters": [
{
"name": "x",
"description": "The value for the independent variable `x`.",
"schema": {
"type": [
"number",
"null"
]
}
},
{
"name": "parameters",
"description": "The parameters for the model function, contains at least one parameter.",
"schema": {
"type": "array",
"minItems": 1,
"items": {
"type": "number"
}
}
}
],
"returns": {
"description": "The computed value `y` value for the given independent variable `x` and the parameters.",
"schema": {
"type": "number"
}
}
}
},
{
"name": "ignore_nodata",
"description": "Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to `false` considers no-data values so that `null` is passed to the model function.",
"schema": {
"type": "boolean"
},
"default": true,
"optional": true
}
],
"returns": {
"description": "An array with the optimal values for the parameters.",
"schema": {
"type": "array",
"minItems": 1,
"items": {
"type": "number"
}
}
}
}