liveBook · Manning

Feature selection

As explained in Outlier Detection in Python

Feature selection is the process of choosing a subset of input features that are most useful for a specified analysis or prediction task.

Feature selection chooses the subset of input features most useful for a specified analysis or prediction task. In outlier detection, it is especially important because unsupervised detectors treat all features equally and cannot learn relevance from a target column. section 4.7

Select features by asking whether unusual values or combinations would matter:

  • Remove irrelevant features to reduce noise, mitigate the curse of dimensionality, and improve detector efficiency. section 4.7
  • Check each feature independently and in combinations, since a column may be uninteresting alone but useful for detecting relationships. section 4.7
  • Treat selection as part of an iterative workflow alongside preprocessing, model fitting, evaluation, and tuning. section 4.1

Staff records

A staff table can retain Staff ID and Start Date when unusual values might reveal data errors or fraud. Test IDs for reasonable ranges or duplicates, then compare Staff ID and Start Date rankings to find inconsistencies. section 4.7

Figure 4.1 Workflow outlining the basic steps in an outlier detection project. This assumes a one-time analysis (as opposed to ongoing monitoring) and skips tests for collective outliers and time-series analysis, which may also often be done. Note the loop between tuning and evaluating the model, which may continue for any number of iterations. Additional loops may also be present in some projects, as any of the steps may be repeated as necessary.

Use the workflow to place feature selection between data cleaning and feature engineering, while revisiting choices during model evaluation and tuning. section 4.1

How Outlier Detection in Python covers it

How deep it goes
Explains relevance questions, dimensionality effects, and staff-record checks, but stops short of a general selection algorithm.
Examples
Uses staff IDs, start dates, duplicate checks, range checks, and rank comparisons as concrete selection tests.
What you can do after
Apply feature selection by removing irrelevant dimensions and testing whether rare values or combinations would be interesting.
How it connects
Links outlier detection with feature engineering, preprocessing, dimensionality, and ensembles of outlier detectors.

Also explained in

Compare how 8 books explain feature selection →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Outlier Detection in Python. The section links point to the parts of the book it draws on.