Skip to content

Commit 7d3b229

Browse files
committed
Curve Fit: Docs
1 parent 5c98904 commit 7d3b229

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

Orange/widgets/model/owcurvefit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ def create_learner(self) -> Optional[CurveFitLearner]:
492492
return learner
493493

494494
def get_learner_parameters(self) -> Tuple[Tuple[str, Any]]:
495-
return tuple(("Function", self.expression), )
495+
return ("Expression", self.expression),
496496

497497
def update_model(self):
498498
super().update_model()

doc/visual-programming/source/widgets/model/curvefit.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,34 @@ Fit a function to data.
1616

1717
The **Curve Fit** widget fits an arbitrary function to the input data. It only works for regression tasks.
1818
The widget uses [scipy.curve_fit](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html) to find the optimal values of the parameters.
19+
20+
The widget works only on regression tasks and only numerical features can be used for fitting.
21+
22+
![](images/CurveFit-stamped.png)
23+
24+
1. The learner/predictor name.
25+
2. Introduce model parameters.
26+
3. Input an expression in Python. The expression should consist of at least one fitting parameter.
27+
4. Select a feature to include into the expression. Only numerical features are available.
28+
5. Select a parameter. Only the introduced parameters are available.
29+
6. Select a function.
30+
7. Press *Apply* to commit changes. If *Apply Automatically* is ticked, changes are committed automatically.
31+
8. Show help, produce a report, input/output info.
32+
33+
Preprocessing
34+
-------------
35+
36+
Curve fit uses default preprocessing when no other preprocessors are given. It executes them in the following order:
37+
38+
- removes instances with unknown target values
39+
- removes empty columns
40+
- imputes missing values with mean values
41+
42+
To remove default preprocessing, connect an empty [Preprocess](../data/preprocess.md) widget to the learner.
43+
44+
Example
45+
-------
46+
47+
Below, is a simple workflow with *housing* dataset. Due to example simplicity we used only a single feature. Unlike the other modelling widgets, the Curve Fit needs data on the input. We trained **Curve Fit** and [Linear Regression](../model/linearregression.md) and evaluated their performance in [Test & Score](../evaluate/testandscore.md).
48+
49+
![](images/CurveFit-example.png)
124 KB
Loading
24.1 KB
Loading

0 commit comments

Comments
 (0)