Feature Engineering for Machine Learning
Read it now on the O’Reilly learning platform with a 10-day free trial.
O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.
Book description
Feature engineering is a crucial step in the machine-learning pipeline, yet this topic is rarely examined on its own. With this practical book, you’ll learn techniques for extracting and transforming features—the numeric representations of raw data—into formats for machine-learning models. Each chapter guides you through a single data problem, such as how to represent text or image data. Together, these examples illustrate the main principles of feature engineering.
Rather than simply teach these principles, authors Alice Zheng and Amanda Casari focus on practical application with exercises throughout the book. The closing chapter brings everything together by tackling a real-world, structured dataset with several feature-engineering techniques. Python packages including numpy, Pandas, Scikit-learn, and Matplotlib are used in code examples.
- Feature engineering for numeric data: filtering, binning, scaling, log transforms, and power transforms
- Natural text techniques: bag-of-words, n-grams, and phrase detection
- Frequency-based filtering and feature scaling for eliminating uninformative features
- Encoding techniques of categorical variables, including feature hashing and bin-counting
- Model-based feature engineering with principal component analysis
- The concept of model stacking, using k-means as a featurization technique
- Image feature extraction with manual and deep-learning techniques
Show and hide more
Publisher resources
Table of contents Product information
Table of contents
- Preface
- Introduction
- Conventions Used in This Book
- Using Code Examples
- O’Reilly Safari
- How to Contact Us
- Acknowledgments
- Special Thanks from Alice
- Special Thanks from Amanda
- Data
- Tasks
- Models
- Features
- Model Evaluation
- Scalars, Vectors, and Spaces
- Dealing with Counts
- Binarization
- Quantization or Binning
- Log Transform in Action
- Power Transforms: Generalization of the Log Transform
- Min-Max Scaling
- Standardization (Variance Scaling)
- ℓ2 Normalization
- Bag-of-X: Turning Natural Text into Flat Vectors
- Bag-of-Words
- Bag-of-n-Grams
- Stopwords
- Frequency-Based Filtering
- Stemming
- Parsing and Tokenization
- Collocation Extraction for Phrase Detection
- Tf-Idf : A Simple Twist on Bag-of-Words
- Putting It to the Test
- Creating a Classification Dataset
- Scaling Bag-of-Words with Tf-Idf Transformation
- Classification with Logistic Regression
- Tuning Logistic Regression with Regularization
- Encoding Categorical Variables
- One-Hot Encoding
- Dummy Coding
- Effect Coding
- Pros and Cons of Categorical Variable Encodings
- Feature Hashing
- Bin Counting
- Intuition
- Derivation
- Linear Projection
- Variance and Empirical Variance
- Principal Components: First Formulation
- Principal Components: Matrix-Vector Formulation
- General Solution of the Principal Components
- Transforming Features
- Implementing PCA
- k-Means Clustering
- Clustering as Surface Tiling
- k-Means Featurization for Classification
- Alternative Dense Featurization
- The Simplest Image Features (and Why They Don’t Work)
- Manual Feature Extraction: SIFT and HOG
- Image Gradients
- Gradient Orientation Histograms
- SIFT Architecture
- Fully Connected Layers
- Convolutional Layers
- Rectified Linear Unit (ReLU) Transformation
- Response Normalization Layers
- Pooling Layers
- Structure of AlexNet
- Item-Based Collaborative Filtering
- First Pass: Data Import, Cleaning, and Feature Parsing
- Academic Paper Recommender: Naive Approach
- Academic Paper Recommender: Take 2
- Academic Paper Recommender: Take 3
- Overview of Linear Classification
- The Anatomy of a Matrix
- From Vectors to Subspaces
- Singular Value Decomposition (SVD)
- The Four Fundamental Subspaces of the Data Matrix
Show and hide more
Product information
- Title: Feature Engineering for Machine Learning
- Author(s): Alice Zheng, Amanda Casari
- Release date: April 2018
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491953242
You might also like
Check it out now on O’Reilly
Dive in for free with a 10-day trial of the O’Reilly learning platform—then explore all the other resources our members count on to build skills and solve problems every day.