Icon

07.04 Feature Selection exercise

<p>07.04 Feature Selection - exercise<br><br>[L4-ML] Machine Learning Algorithms - Specialization</p><p>07 Data Cleaning Preparation<br>- Combine previously splitted training and test set<br>- Search for the most important columns for classification using a feature selection loop</p>

URL: Ames Housing Dataset on kaggle https://www.kaggle.com/prevek18/ames-housing-dataset
URL: Description of the Ames Iowa Housing Data https://rdrr.io/cran/AmesHousing/man/ames_raw.html

07 - Data Cleaning & Preparation

07.04 Feature Selection

Learning objective: In this exercise you learn how to clean the data to build a better model, in particular by applying Feature Selection.


Workflow description: In this workflow, feature selection will be implemented for the dataset using a Feature Selection Loop.


You'll find the instructions to the exercises in the yellow annotations.

Step 1. Start feature selection loop

Apply a forward feature selection algorithm to the trained model (Forward Feature Selection metanode)

  • Replace the Learner and Predictor nodes by the Logistic Regression Learner and Logistic Regression Predictor nodes in the workflow

  • Exclude the rank column in the Feature Selection Loop Start node

  • Select stratified sampling on the rank column in the Partitioning node

  • Select Cohen's kappa as the metric to maximize in the Feature Selection Loop End node

  • Take a look at the Feature Selection Filter node. Which columns can you leave out and still obtain the maximum Cohen's kappa?


Step 2. Use the Reference Column Filter node to apply forward feature selection to the test set

Data Preparation


Read AmesHousing.csv
CSV Reader
Outlier Detection
Preprocessing
Missing Value Handling
Dimensionality Reduction

Nodes

Extensions

Links