Book Image

Python Feature Engineering Cookbook

By : Soledad Galli
Book Image

Python Feature Engineering Cookbook

By: Soledad Galli

Overview of this book

Feature engineering is invaluable for developing and enriching your machine learning models. In this cookbook, you will work with the best tools to streamline your feature engineering pipelines and techniques and simplify and improve the quality of your code. Using Python libraries such as pandas, scikit-learn, Featuretools, and Feature-engine, you’ll learn how to work with both continuous and discrete datasets and be able to transform features from unstructured datasets. You will develop the skills necessary to select the best features as well as the most suitable extraction techniques. This book will cover Python recipes that will help you automate feature engineering to simplify complex processes. You’ll also get to grips with different feature engineering strategies, such as the box-cox transform, power transform, and log transform across machine learning, reinforcement learning, and natural language processing (NLP) domains. By the end of this book, you’ll have discovered tips and practical solutions to all of your feature engineering problems.
Table of Contents (13 chapters)

Technical requirements

In this chapter, we will use the pandas, NumPy, SciPy, and Matplotlib Python libraries, all of which can be installed using the free Anaconda Python distribution. To do this, follow the instructions in the Technical requirements section of Chapter 1, Foreseeing Variable Problems when Building ML Models.

We will also use the open source Python library Featuretools, which can be installed using pip or conda. Follow the instructions in the following documentation: https://docs.featuretools.com/en/stable/getting_started/install.html.

Throughout the recipes in this chapter, we will work with a mock customer transaction dataset that comes with Featuretools and the Appliances energy prediction dataset, available in the UCI Machine Learning Repository: http://archive.ics.uci.edu/ml/datasets/Appliances+energy+prediction.

Dua, D. and Graff, C. (2019). UCI...