Personal tools

Feature Extraction and Preprocessing

 
The University of Chicago_050723C
[The University of Chicago - Vivian Wu]
 
 

- Overview

Data preprocessing cleans and formats raw data for machine learning (ML), while feature extraction transforms that data into compact, informative variables. Together, they reduce noise, lower dimensionality, speed up training, and improve model accuracy. 

1. Data Preprocessing:

  • Cleaning: Remove duplicate records, fix errors, and handle missing values via imputation (mean, median, mode, or k-NN) or row/column removal.
  • Scaling and Normalization: Standardize features (zero mean, unit variance) or scale them to a fixed range (such as 0 to 1) so algorithms are not skewed by large magnitudes.
  • Encoding: Convert categorical labels into numeric formats using one-hot encoding or ordinal/label encoding.
  • Splitting and Balancing: Partition data into training and test sets, and address class imbalance using resampling methods like SMOTE or undersampling.

 

2. Feature Extraction:

  • Feature extraction creates new, condensed features from raw or high-dimensional data (unlike feature selection, which only picks a subset of existing features).
  • Dimensionality Reduction: Methods like Principal Component Analysis (PCA) or Linear Discriminant Analysis (LDA) project data onto fewer components while preserving key variance or class separability.
  • Tabular and Time-Series Data: Compute summary statistics (mean, standard deviation, skewness), rolling window metrics, lag features, or domain-specific ratios.
  • Text (NLP): Turn text into numerical vectors using Bag of Words, TF-IDF, or dense embeddings.
  • Images and Signals: Extract edges, histograms, or textures (such as HOG or Gabor filters), use intermediate layers of Convolutional Neural Networks (CNNs), or apply Fourier and wavelet transforms for time-frequency signals.

 

3. Common Tools:

• Python: scikit-learn, pandas, NumPy, OpenCV, PyTorch, TensorFlow, tsfresh, and featuretools. 

 

 

[More to come ...]

 

 

 
Document Actions