-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4058 from ajdapretnar/calibrated-learner
Calibrated Learner: basic docs
- Loading branch information
Showing
4 changed files
with
64 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
doc/visual-programming/source/widgets/model/calibratedlearner.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Calibrated Learner | ||
================== | ||
|
||
Wraps another learner with probability calibration and decision threshold optimization. | ||
|
||
**Inputs** | ||
|
||
- Data: input dataset | ||
- Preprocessor: preprocessing method(s) | ||
- Base Learner: learner to calibrate | ||
|
||
**Outputs** | ||
|
||
- Learner: calibrated learning algorithm | ||
- Model: trained model using the calibrated learner | ||
|
||
This learner produces a model that calibrates the distribution of class probabilities and optimizes decision threshold. The widget works only for binary classification tasks. | ||
|
||
![](images/Calibrated-Learner-stamped.png) | ||
|
||
1. The name under which it will appear in other widgets. Default name is composed of the learner, calibration and optimization parameters. | ||
2. Probability calibration: | ||
|
||
- [Sigmoid calibration](http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.1639) | ||
- [Isotonic calibration](https://scikit-learn.org/stable/auto_examples/plot_isotonic_regression.html) | ||
- No calibration | ||
|
||
3. Decision threshold optimization: | ||
|
||
- Optimize classification accuracy | ||
- Optimize F1 score | ||
- No threshold optimization | ||
|
||
4. Press *Apply* to commit changes. If *Apply Automatically* is ticked, changes are committed automatically. | ||
|
||
Example | ||
------- | ||
|
||
A simple example with **Calibrated Learner**. We are using the *titanic* data set as the widget requires binary class values (in this case they are 'survived' and 'not survived'). | ||
|
||
We will use [Logistic Regression](logisticregression.md) as the base learner which will we calibrate with the default settings, that is with sigmoid optimization of distribution values and by optimizing the CA. | ||
|
||
Comparing the results with the uncalibrated **Logistic Regression** model we see that the calibrated model performs better. | ||
|
||
![](images/Calibrated-Learner-Example.png) |
Binary file added
BIN
+192 KB
doc/visual-programming/source/widgets/model/images/Calibrated-Learner-Example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.8 KB
doc/visual-programming/source/widgets/model/images/Calibrated-Learner-stamped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.