𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Machine Learning with Python Cookbook: Practical Solutions from Preprocessing to Deep Learning (2nd Ed, Release 5)

✍ Scribed by Chris Albon


Publisher
O’Reilly Media
Year
2018
Tongue
English
Leaves
169
Edition
2
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


This practical guide provides nearly 200 self-contained recipes to help you solve machine learning challenges you may encounter in your daily work. If you’re comfortable with Python and its libraries, including pandas and scikit-learn, you’ll be able to address specific problems such as loading data, handling text or numerical data, model selection, and dimensionality reduction and many other topics.
Each recipe includes code that you can copy and paste into a toy dataset to ensure that it actually works. From there, you can insert, combine, or adapt the code to help construct your application. Recipes also include a discussion that explains the solution and provides meaningful context. This cookbook takes you beyond theory and concepts by providing the nuts and bolts you need to construct working machine learning applications.

You’ll find recipes for:
● Vectors, matrices, and arrays
● Handling numerical and categorical data, text, images, and dates and times
● Dimensionality reduction using feature extraction or feature selection
● Model evaluation and selection
● Linear and logical regression, trees and forests, and k-nearest neighbors
● Support vector machines (SVM), naΓ―ve Bayes, clustering, and neural networks
● Saving and loading trained models

Who This Book Is For
This book is not an introduction to machine learning. If you are not comfortable with the basic concepts of machine learning or have never spent time learning machine learning, do not buy this book. Instead, this book is for the machine learning practitioner who, while comfortable with the theory and concepts of machine learning, would benefit from a quick reference containing code to solve challenges he runs into working on machine learning on an everyday basis.
This book assumes the reader is comfortable with the Python programming language and package management.

Who This Book Is Not For
As stated previously, this book is not an introduction to machine learning. This book should not be your first. If you are unfamiliar with concepts like cross-validation, random forest, and gradient descent, you will likely not benefit from this book as much as one of the many high-quality texts specifically designed to introduce you to the topic. I recommend reading one of those books and then coming back to this book to learn working, practical solutions for machine learning.

✦ Table of Contents


  1. Working with Vectors, Matrices and Arrays in NumPy
    1.0. Introduction
    1.1. Creating a Vector
    1.2. Creating a Matrix
    1.3. Creating a Sparse Matrix
    1.4. Pre-allocating Numpy Arrays
    1.5. Selecting Elements
    1.6. Describing a Matrix
    1.7. Applying Functions Over Each Element
    1.8. Finding the Maximum and Minimum Values
    1.9. Calculating the Average, Variance, and Standard Deviation
    1.10. Reshaping Arrays
    1.11. Transposing a Vector or Matrix
    1.12. Flattening a Matrix
    1.13. Finding the Rank of a Matrix
    1.14. Getting the Diagonal of a Matrix
    1.15. Calculating the Trace of a Matrix
    1.16. Calculating Dot Products
    1.17. Adding and Subtracting Matrices
    1.18. Multiplying Matrices
    1.19. Inverting a Matrix
    1.20. Generating Random Values
  2. Loading Data
    2.0. Introduction
    2.1. Loading a Sample Dataset
    2.2. Creating a Simulated Dataset
    2.3. Loading a CSV File
    2.4. Loading an Excel File
    2.5. Loading a JSON File
    2.6. Loading a parquet file
    2.7. Loading a avro file
    2.8. Loading a TFRecord file
    2.9. Querying a SQLite Database
    2.10. Querying a Remote SQL Database
    2.11. Loading Data from a Google Sheet
    2.12. Loading Data from an S3 Bucket
    2.13. Loading Unstructured Data
  3. Data Wrangling
    3.0. Introduction
    3.1. Creating a Data Frame
    3.2. Getting Information about the Data
    3.3. Slicing DataFrames
    3.4. Selecting Rows Based on Conditionals
    3.5. Sorting Values
    3.6. Replacing Values
    3.7. Renaming Columns
    3.8. Finding the Minimum, Maximum, Sum, Average, and Count
    3.9. Finding Unique Values
    3.10. Handling Missing Values
    3.11. Deleting a Column
    3.12. Deleting a Row
    3.13. Dropping Duplicate Rows
    3.14. Grouping Rows by Values
    3.15. Grouping Rows by Time
    3.16. Aggregating Operations and Statistics
    3.17. Looping Over a Column
    3.18. Applying a Function Over All Elements in a Column
    3.19. Applying a Function to Groups
    3.20. Concatenating DataFrames
    3.21. Merging DataFrames
  4. Handling Numerical Data
    4.0. Introduction
    4.1. Rescaling a Feature
    4.2. Standardizing a Feature
    4.3. Normalizing Observations
    4.4. Generating Polynomial and Interaction Features
    4.5. Transforming Features
    4.6. Detecting Outliers
    4.7. Handling Outliers
    4.8. Discretizating Features
    4.9. Grouping Observations Using Clustering
    4.10. Deleting Observations with Missing Values
    4.11. Imputing Missing Values
  5. Handling Categorical Data
    5.0. Introduction
    5.1. Encoding Nominal Categorical Features
    5.2. Encoding Ordinal Categorical Features
    5.3. Encoding Dictionaries of Features
    5.4. Imputing Missing Class Values
    5.5. Handling Imbalanced Classes
  6. Handling Text
    6.0. Introduction
    6.1. Cleaning Text
    6.2. Parsing and Cleaning HTML
    6.3. Removing Punctuation
    6.4. Tokenizing Text
    6.5. Removing Stop Words
    6.6. Stemming Words
    6.7. Tagging Parts of Speech
    6.8. Performing Named-Entity Recognition
    6.9. Encoding Text as a Bag of Words
    6.10. Weighting Word Importance
    6.11. Using Word Vectors to Calculate Text Similarity in a Search Query
    6.12. Using a Sentiment Analysis Classifier
  7. Handling Dates and Times
    7.0. Introduction
    7.1. Converting Strings to Dates
    7.2. Handling Time Zones
    7.3. Selecting Dates and Times
    7.4. Breaking Up Date Data into Multiple Features
    7.5. Calculating the Difference Between Dates
    7.6. Encoding Days of the Week
    7.7. Creating a Lagged Feature
    7.8. Using Rolling Time Windows
    7.9. Handling Missing Data in Time Series
  8. Handling Images
    8.0. Introduction
    8.1. Loading Images
    8.2. Saving Images
    8.3. Resizing Images
    8.4. Cropping Images
    8.5. Blurring Images
    8.6. Sharpening Images
    8.7. Enhancing Contrast
    8.8. Isolating Colors
    8.9. Binarizing Images
    8.10. Removing Backgrounds
    8.11. Detecting Edges
    8.12. Detecting Corners
    8.13. Creating Features for Machine Learning
    8.14. Encoding Convolutions as a Feature
    8.15. Encoding Color Histograms as Features
    8.16. Using Pretrained Embeddings as a Feature
    8.17. Detecting Objects with OpenCV
    8.18. Classifying Images with Pytorch
  9. Dimensionality Reduction Using Feature Extraction
    9.0. Introduction
    9.1. Reducing Features Using Principal Components
    9.2. Reducing Features When Data Is Linearly Inseparable
    9.3. Reducing Features by Maximizing Class Separability
    9.4. Reducing Features Using Matrix Factorization
    9.5. Reducing Features on Sparse Data
  10. Dimensionality Reduction Using Feature Selection
    10.0. Introduction
    10.1. Thresholding Numerical Feature Variance
    10.2. Thresholding Binary Feature Variance
    10.3. Handling Highly Correlated Features
    10.4. Removing Irrelevant Features for Classification
    10.5. Recursively Eliminating Features

πŸ“œ SIMILAR VOLUMES


Machine Learning with Python Cookbook: P
✍ Chris Albon πŸ“‚ Library πŸ“… 2018 πŸ› O’Reilly Media 🌐 English

This practical guide provides nearly 200 self-contained recipes to help you solve machine learning challenges you may encounter in your daily work. If you’re comfortable with Python and its libraries, including pandas and scikit-learn, you’ll be able to address specific problems such as loading data

Machine Learning with Python Cookbook: P
✍ Chris Albon πŸ“‚ Library πŸ“… 2018 πŸ› O’Reilly Media 🌐 English

This practical guide provides nearly 200 self-contained recipes to help you solve machine learning challenges you may encounter in your daily work. If you’re comfortable with Python and its libraries, including pandas and scikit-learn, you’ll be able to address specific problems such as loading data

Machine learning with Python cookbook :
✍ Chris Albon πŸ“‚ Library πŸ“… 2018 πŸ› O'Reilly Media, Inc. 🌐 English

With Early Release ebooks, you get books in their earliest form--the author's raw and unedited content as he or she writes--so you can take advantage of these technologies long before the official release of these titles. You'll also receive updates when significant changes are made, new chapters ar

Machine learning with Python cookbook: p
✍ Albon, Chris πŸ“‚ Library πŸ“… 2018 πŸ› O'Reilly Media, Inc. 🌐 English

Vectors, matrices, and arrays -- Loading data -- Data wrangling -- Handling numerical data -- Handling categorical data -- Handling text -- Handling dates and times -- Handling images -- Dimensionalit reduction using feature extraction -- Dimensionality reduction using feature selection -- Model eva

Machine learning with Python cookbook: p
✍ Albon, Chris πŸ“‚ Library πŸ“… 2018 πŸ› O'Reilly Media, Inc. 🌐 English

Vectors, matrices, and arrays -- Loading data -- Data wrangling -- Handling numerical data -- Handling categorical data -- Handling text -- Handling dates and times -- Handling images -- Dimensionalit reduction using feature extraction -- Dimensionality reduction using feature selection -- Model eva

Machine learning with Python cookbook: p
✍ Albon, Chris πŸ“‚ Library πŸ“… 2018 πŸ› O'Reilly Media 🌐 English

Vectors, matrices, and arrays -- Loading data -- Data wrangling -- Handling numerical data -- Handling categorical data -- Handling text -- Handling dates and times -- Handling images -- Dimensionalit reduction using feature extraction -- Dimensionality reduction using feature selection -- Model eva