Hands-On Predictive Analytics with Python
图书信息
| 作者 | Alvaro Fuentes |
| 出版社 | Packt Publishing |
| ISBN | 9781789134544 |
| 出版时间 | 2018-12-28 |
| 字数 | 38.6万 |
| 分类 | 进口书,外文原版书,电脑,网络 |
读书简介
Step-by-step guide to build high performing predictive applications Key Features *Use the Python data analytics ecosystem to implement end-to-end predictive analytics projects *Explore advanced predictive modeling algorithms with an emphasis on theory with intuitive explanations *Learn to deploy a predictive model's results as an interactive application Book Description Predictive analytics is an applied field that employs a variety of quantitative methods using data to make predictions. It involves much more than just throwing data onto a computer to build a model. This book provides practical coverage to help you understand the most important concepts of predictive analytics. Using practical, step-by-step examples, we build predictive analytics solutions while using cutting-edge Python tools and packages. The book's step-by-step approach starts by defining the problem and moves on to identifying relevant data. We will also be performing data preparation, exploring and visualizing relationships, building models, tuning, evaluating, and deploying model. Each stage has relevant practical examples and efficient Python code. You will work with models such as KNN, Random Forests, and neural networks using the most important libraries in Python's data science stack: NumPy, Pandas, Matplotlib, Seaborn, Keras, Dash, and so on. In addition to hands-on code examples, you will find intuitive explanations of the inner workings of the main techniques and algorithms used in predictive analytics. By the end of this book, you will be all set to build high-performance predictive analytics solutions using Python programming. What you will learn *Get to grips with the main concepts and principles of predictive analytics *Learn about the stages involved in producing complete predictive analytics solutions *Understand how to define a problem, propose a solution, and prepare a dataset *Use visualizations to explore relationships and gain insights into the dataset *Learn to build regression and classification models using scikit-learn *Use Keras to build powerful neural network models that produce accurate predictions *Learn to serve a model's predictions as a web application Who this book is for This book is for data analysts, data scientists, data engineers, and Python developers who want to learn about predictive modeling and would like to implement predictive analytics solutions using Python's data stack. People from other backgrounds who would like to enter this exciting field will greatly benefit from reading this book. All you need is to be proficient in Python programming and have a basic understanding of statistics and college-level algebra.
目录
Title Page
Copyright and Credits
Hands-On Predictive Analytics with Python
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
The Predictive Analytics Process
Technical requirements
What is predictive analytics?
Reviewing important concepts of predictive analytics
The predictive analytics process
Problem understanding and definition
Data collection and preparation
Dataset understanding using EDA
Model building
Model evaluation
Communication and/or deployment
CRISP-DM and other approaches
A quick tour of Python's data science stack
Anaconda
Jupyter
NumPy
A mini NumPy tutorial
SciPy
pandas
Matplotlib
Seaborn
Scikit-learn
TensorFlow and Keras
Dash
Summary
Further reading
Problem Understanding and Data Preparation
Technical requirements
Understanding the business problem and proposing a solution
Context is everything
Define what is going to be predicted
Make explicit the data that will be required
Think about access to the data
Proposing a solution
Define your methodology
Define key metrics of model performance
Define the deliverables of the project
Practical project – diamond prices
Diamond prices – problem understanding and definition
Getting more context
Diamond prices – proposing a solution at a high level
Goal
Methodology
Metrics for the model
Deliverables for the project
Diamond prices – data collection and preparation
Dealing with missing values
Practical project – credit card default
Credit card default – problem understanding and definition
Credit card default – proposing a solution
Goal
Methodology
Metrics for the model
Deliverables of the project
Credit card default – data collection and preparation
Credit card default – numerical features
Encoding categorical features
Low variance features
Near collinearity
One-hot encoding with pandas
A brief introduction to feature engineering
Summary
Further reading
Dataset Understanding – Exploratory Data Analysis
Technical requirements
What is EDA?
Univariate EDA
Univariate EDA for numerical features
Univariate EDA for categorical features
Bivariate EDA
Two numerical features
Scatter plots
The Pearson correlation coefficient
Two categorical features
Cross tables
Barplots for two categorical variables
One numerical feature and one categorical feature
Introduction to graphical multivariate EDA
Summary
Further reading
Predicting Numerical Values with Machine Learning
Technical requirements
Introduction to ML
Tasks in supervised learning
Creating your first ML model
The goal of ML models – generalization
Overfitting
Evaluation function and optimization
Practical considerations before modeling
Introducing scikit-learn
Further feature transformations
Train-test split
Dimensionality reduction using PCA
Standardization – centering and scaling
MLR
Lasso regression
KNN
Training versus testing error
Summary
Further reading
Predicting Categories with Machine Learning
Technical requirements
Classification tasks
Predicting categories and probabilities
Credit card default dataset
Logistic regression
A simple logistic regression model
A complete logistic regression model
Classification trees
How trees work
The good and the bad of trees
Training a larger classification tree
Random forests
Training versus testing error
Multiclass classification
Naive Bayes classifiers
Conditional probability
Bayes' theorem
Using Bayesian terms
Back to the classification problem
Gaussian Naive Bayes
Gaussian Naive Bayes with scikit-learn
Summary
Further reading
Introducing Neural Nets for Predictive Analytics
Technical requirements
Introducing neural network models
Deep learning
Anatomy of an MLP – elements of a neural network model
How MLPs learn
Introducing TensorFlow and Keras
TensorFlow
Keras – deep learning for humans
Regressing with neural networks
Building the MLP for predicting diamond prices
Training the MLP
Making predictions with the neural network
Classification with neural networks
Building the MLP for predicting credit card default
Evaluating predictions
The dark art of training neural networks
So many decisions; so little time
Regularization for neural networks
Using a validation set
Early stopping
Dropout
Practical advice on training neural networks
Summary
Further reading
Model Evaluation
Technical requirements
Evaluation of regression models
Metrics for regression models
MSE and Root Mean Squared Error (RMSE)
MAE
R-squared (R2)
Defining a custom metric
Visualization methods for evaluating regression models
Evaluation for classification models
Confusion matrix and related metrics
Visualization methods for evaluating classification models
Visualizing probabilities
Receiver Operating Characteristic (ROC) and precision-recall curves
Defining a custom metric for classification
The k-fold cross-validation
Summary
Further reading
Model Tuning and Improving Performance
Technical requirements
Hyperparameter tuning
Optimizing a single hyperparameter
Optimizing more than one parameter
Improving performance
Improving our diamond price predictions
Fitting a neural network
Transforming the target
Analyzing the results
Not only a technical problem but a business problem
Summary
Implementing a Model with Dash
Technical requirements
Model communication and/or deployment phase
Using a technical report
A feature of an existing product
Using an analytic application
Introducing Dash
What is Dash?
Plotly
Installation
The application layout
Building a basic static app
Building a basic interactive app
Implementing a predictive model as a web application
Producing the predictive model objects
Building the web application
Summary
Further reading
Other Books You May Enjoy
Leave a review - let other readers know what you think
- 中国资本市场:重塑生态链(吴晓求 等)
- 纸上王国(邓安庆)
- 不见长安(则慕)
- 《新东方英语》中学生2014年12月号(《新东方英语》编辑部)
- Dead Cat Bounce(Green, Norman)
- 文治帝国:大宋300年的世运与人物【畅销书《一看就停不下来的中国史》作者重磅新书!】(艾公子)
- 区块链编程((美)吉米·宋(Jimmy Song))
- 建设工程监理案例分析(仅适用PC阅读)(执业资格考试命题研究中心)
