> For the complete documentation index, see [llms.txt](https://hwasumok.gitbook.io/r-flow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hwasumok.gitbook.io/r-flow/python/machine-learning/feature-selection.md).

# Feature Selection

GenericUnivariateSelect/RFE/RFECV/SelectFromModel

## Common

### Input Data

|                      | Inputs                                                                                                                                                                                                                                                   |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **\*Target Data(X)** | Data Input                                                                                                                                                                                                                                               |
| **\*Model Name**     | Name of the user-defined feature selection model                                                                                                                                                                                                         |
| **Transform**        | <p>If not empty, the output data with only selected features will be stored here. </p><p>If left empty, the model will only compute scores on individual features.</p>                                                                                   |
| **Conv.DataFrame**   | If checked, the output data created by Transform will be converted into a DataFrame.                                                                                                                                                                     |
| **\*X**              | <p>User-selected columns to be X.</p><ul><li><p><strong>Data type:</strong></p><ul><li>GenericUnivariateSelect: numeric.</li><li>else: Correct data type for the selected estimator.</li></ul></li><li>One or more columns should be selected.</li></ul> |
| **\*Y**              | User-selected columns to be Y.                                                                                                                                                                                                                           |

### Defining estimators

In case of using **RFE/RFECV/SelectFromModel**, you have to define the estimator in **Arguments.**

[**About R-Flow estimators** ](https://hwasumok.gitbook.io/r-flow/python/machine-learning/estimator)

![\[Task information of GenericUnivariateSelect\]](https://3929524962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGaxNdSdRN_L_WNiX4I%2F-MKZ4GQTxe6QVVe-07p5%2F-MKZ4SzJoOQK65kck2Sc%2Fimage.png?alt=media\&token=ce84471b-cefd-46f7-a181-855a5ccbe180)

## Workflow Example&#x20;

[R-Flow Task Example Video: RFE](https://www.youtube.com/watch?v=GG6hED56jYQ)

R-Flow Task Example - GenericUnivariateSelect

![](https://3929524962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGaxNdSdRN_L_WNiX4I%2F-MLNevFhcaH4SC7o60F2%2F-MLNfLATsRioS5ezSqPf%2Fimage.png?alt=media\&token=048030bc-2432-488e-bcdf-7c5120c4f243)

## Python Package

**GenericUnivariateSelect**: <https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.GenericUnivariateSelect.html>

**RFE**: <https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.RFE.html>

**RFECV**: <https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.RFECV.html>

**SelectFromModel**: <https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.SelectFromModel.html>
