-
Notifications
You must be signed in to change notification settings - Fork 17
/
fit_curve.json
94 lines (94 loc) · 3.68 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
91
92
93
94
{
"id": "fit_curve",
"summary": "Curve fitting",
"description": "Use non-linear least squares to fit a model function `y = f(x, parameters)` to data.\n\nThe process throws an `InvalidValues` exception if invalid values are encountered. Invalid values are finite numbers (see also ``is_valid()``).",
"categories": [
"cubes",
"math"
],
"experimental": true,
"parameters": [
{
"name": "data",
"description": "A data cube.",
"schema": {
"type": "object",
"subtype": "raster-cube"
}
},
{
"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"
}
},
{
"title": "Data Cube with optimal values from a previous result of this process.",
"type": "object",
"subtype": "raster-cube"
}
]
},
{
"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"
}
},
{
"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": "dimension",
"description": "The name of the dimension for curve fitting. Must be a dimension with labels that have a order (i.e. numerical labels or a temporal dimension). Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist.",
"schema": {
"type": "string"
}
}
],
"returns": {
"description": "A data cube with the optimal values for the parameters.",
"schema": {
"type": "object",
"subtype": "raster-cube"
}
},
"exceptions": {
"InvalidValues": {
"message": "At least one of the values is not a finite number."
},
"DimensionNotAvailable": {
"message": "A dimension with the specified name does not exist."
}
}
}