-
-
Notifications
You must be signed in to change notification settings - Fork 991
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Rename Feature Constructor to Formula (#6549)
* Rename Feature Constructor to Formula * Update widget.json * feature-constructor2-stamped.png - resize and index * Formula documentation: Minor changes * index.rst - fix reference to formula * move accidentally displaced formula.md --------- Co-authored-by: PrimozGodec <p.godec9@gmail.com>
- Loading branch information
1 parent
0aec15e
commit a1a1c92
Showing
8 changed files
with
65 additions
and
73 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
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
67 changes: 0 additions & 67 deletions
67
doc/visual-programming/source/widgets/data/featureconstructor.md
This file was deleted.
Oops, something went wrong.
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,58 @@ | ||
Formula | ||
======= | ||
|
||
Add new features to your dataset. | ||
|
||
**Inputs** | ||
|
||
- Data: input dataset | ||
|
||
**Outputs** | ||
|
||
- Data: dataset with additional features | ||
|
||
**Formula** allows computing new columns by combining the existing ones with a user-defined expression. The resulting column can be categorical, numerical or textual. | ||
|
||
For numeric variables, it sufices to provide a name and an expression. | ||
|
||
![](images/feature-constructor1-stamped.png) | ||
|
||
1. List of constructed variables | ||
2. Add or remove variables | ||
3. New feature name | ||
4. Expression in Python | ||
5. Select a feature | ||
6. Select a function | ||
7. Produce a report | ||
8. Press *Send* to communicate changes | ||
|
||
The following example shows construction of a categorical variable: its value is "lower" is "sepal length" is below 6, "mid" if it is at least 6 but below 7, and "higher" otherwise. Note that spaces need to be replaced by underscores (`sepal_length`). | ||
|
||
![](images/feature-constructor2-stamped.png) | ||
|
||
1. List of variable definitions | ||
2. Add or remove variables | ||
3. New feature name | ||
4. Expression in Python | ||
5. If checked, the feature is put among meta attributes | ||
6. Select a feature to use in expression | ||
7. Select a function to use in expression | ||
8. Optional list of values, used to define their order | ||
9. Press *Send* to compute and output data | ||
|
||
Hints | ||
----- | ||
|
||
If you are unfamiliar with Python math language, here's a quick introduction. | ||
|
||
Expressions can use the following operators: | ||
- `+`, `-`, `*`, `/`: addition, subtraction, multiplication, division | ||
- `//`: integer division | ||
- `%`: remainder after integer division | ||
- `**`: exponentiation (for square root square by 0.5) | ||
- `<`, `>`, `<=`, `>=` less than, greater than, less or equal, greater or equal | ||
- `==` equal | ||
- `!=` not equal | ||
- if-else: *value* `if` *condition* else *other-value* (see the above example | ||
|
||
See more [here](http://www.tutorialspoint.com/python/python_basic_operators.htm). |
Binary file removed
BIN
-113 KB
doc/visual-programming/source/widgets/data/images/FeatureConstructor-Example.png
Binary file not shown.
Binary file modified
BIN
+22.2 KB
(230%)
doc/visual-programming/source/widgets/data/images/feature-constructor2-stamped.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-13 KB
doc/visual-programming/source/widgets/data/images/feature-constructor2.png
Binary file not shown.
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