You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:description: Regression between DataSets using weighted average of neighbours
7
+
:discussion:
8
+
9
+
KNNRegressor is a supervised machine learning algorithm for regression. In order to make predictions, the KNNRegressor must first be ``fit`` with an input :fluid-obj:`DataSet` of data points, each of which is paired (by means of a shared identifier) with another data point in an output DataSet.
11
10
11
+
It uses an internal ``KDTree`` to find an input point's ``numNeighbours`` nearest neighbours in an input dataset. The output returned is a weighted average of those neighbours' values from the output DataSet.
12
+
13
+
The output DataSet must have only 1 dimension.
12
14
13
15
:control numNeighbours:
14
16
15
-
number of neigbours to consider in mapping, min 1
17
+
Number of neighbours to consider when interpolating the regressed value. The default is 3.
16
18
17
19
:control weight:
18
20
19
-
Whether to weight neighbours by distance when producing new point
20
-
21
+
Whether to weight neighbours by distance when producing new point. The default is 1 (true).
21
22
22
23
:message fit:
23
24
24
-
:arg sourceDataSet:Source data
25
+
:arg sourceDataSet:input :fluid-obj:`DataSet`
25
26
26
-
:arg targetDataSet:Target data
27
+
:arg targetDataSet:output :fluid-obj:`DataSet` containing only one dimension.
27
28
28
29
:arg action: Run when done
29
30
30
-
Map a source:fluid-obj:`DataSet` to a one-dimensional target; both DataSets need to have the same number of points.
31
+
Map an input:fluid-obj:`DataSet` to a one-dimensional output DataSet.
31
32
32
33
:message predict:
33
34
34
-
:arg sourceDataSet:data to regress
35
+
:arg sourceDataSet:input :fluid-obj:`DataSet`
35
36
36
-
:arg targetDataSet:output data
37
+
:arg targetDataSet:a :fluid-obj:`DataSet` to write the predictions into
37
38
38
39
:arg action: Run when done
39
40
40
-
Apply learned mapping to a :fluid-obj:`DataSet` and write to an output DataSet
41
+
Apply learned mapping to a :fluid-obj:`DataSet` and write predictions to an output DataSet
41
42
42
43
:message predictPoint:
43
44
44
45
:arg buffer: data point
45
46
46
47
:arg action: Run when done
47
48
48
-
Apply learned mapping to a data point in a |buffer|
49
+
Apply learned mapping to a data point in a |buffer| the predicted value is returned.
0 commit comments