Feature Selection

Algorithm Description

Check here for a presentation on the methods and the relevant info.

Example 1 - Feature Selection using Correlation

Dataset

The dataset of this example is the iris dataset, which can be loaded as a pandas dataframe using the commands:

iris = datasets.load_iris()
data = pd.DataFrame(data=np.c_[iris['data'], iris['target']], columns=iris['feature_names'] + ['target'])

Solution

Click here to download the solution to this example problem.

Example 2 - Feature Selection using Mutual Information

Dataset

The dataset of this example is the iris dataset, which can be loaded as above.

Solution

Click here to download the solution to this example problem.

Exercise

Can we perform the same analysis using the chi squared statistic? Apply it again on the iris dataset, which can be loaded as above.

Try this before you check the solution (here).


Previous section:
Next section: