Skip to content

Commit ffdfcb3

Browse files
authored
Merge pull request #3 from janezd/feature-as-predictor
Feature As Predictor: Add documentation
2 parents cb88497 + b1bff04 commit ffdfcb3

7 files changed

+50
-0
lines changed

source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ Evaluate
136136
widgets/evaluate/testandscore
137137
widgets/evaluate/permutationplot
138138
widgets/evaluate/parameterfitter
139+
widgets/evaluate/featureaspredictor
139140

140141

141142
.. toctree::
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Feature as Predictor
2+
====================
3+
4+
Constructs a model that uses a selected feature as a predictor.
5+
6+
**Inputs**
7+
8+
- Data: data table
9+
10+
**Outputs**
11+
12+
- Model: a model that uses the selected feature as a predictor
13+
- Learner: a learning algorithm that trains such a model
14+
15+
The widget is useful in situations where we would like to test the predictive power of a single feature.
16+
17+
The target variable can be categorical or numeric.
18+
19+
<img src="../../_images/FeatureAsPredictor-stamped.png" width="50%"/>
20+
21+
22+
1. Select the feature. The widget limits the selection as follows.
23+
24+
- For binary target variables, the feature used as a predictor can be either numeric or categorical. Values of numeric features are treated as probabilities of the target class. If their range is not between 0 and 1, they are transformed through sigmoid function with fitted coefficients. If values are between 0 and 1, transformation is optional. If the feature is categorical, it must have the same values as the target variable.
25+
26+
- For other target variables, the feature used must be categorical and must contain only values that are present in the target variable.
27+
28+
- If the target variable is numeric, the feature must be numeric, too. It can be transformed with a linear regression model.
29+
30+
2. Enable transformation. When transformation is applied, the model constructed by the widget is equivalent to a logistic or linear regression model.
31+
32+
This feature is disabled when the transformation is not applicable or enforced.
33+
34+
35+
Examples
36+
--------
37+
38+
Two groups, called "yellow" and "green" compete at distinguishing between the works of Monet and Manet. We can choose the group in Feature as Predictor and observe the usual classification results.
39+
40+
![](images/FeatureAsPredictor-MonetManet.png)
41+
42+
How well does the price of a house correlate with the number of rooms? Here we can (and must) enable transformation because the scale of the feature's values is very different from the scale of the target variable. Note that this measures the fit rather than predictive power because we do not test the model on unseen data.
43+
44+
![](images/FeatureAsPredictor-housing.png)
45+
46+
How well can we predict the heart disease based on the maximal heart rate? Here we connect the *Feature as Predictor* widget to the *Test and Score* widget to evaluate the model on unseen data. In this case, Feature as Predictor provides a learning algorithm that fits a logistic regression model to the feature's values.
47+
48+
![](images/FeatureAsPredictor-heartDisease.png)
49+
189 KB
Loading
120 KB
Loading
107 KB
Loading
36.3 KB
Loading
38.5 KB
Loading

0 commit comments

Comments
 (0)