Hands-On Predictive Analytics with Python: Master the complete predictive analytics process, from problem definition to model deployment
Book information
Description
A step-by-step guide to building high performing predictive applications Key FeaturesUse the Python data analytics ecosystem to implement end-to-end predictive analytics projectsGet up to speed with advanced predictive modeling algorithms with the help of detailed explanationsLearn to present a predictive model's results as an interactive applicationBook Description Predictive analytics is a field of applied analytics that employs a variety of quantitative methods to analyze your data and make predictions. This book guides you through the most important concepts related to predictive analytics. With the help of practical, step-by-step examples, you'll be able to build predictive analytics solutions while using cutting-edge Python tools and packages. You'll learn effectively by defining the problem and then moving on to identifying relevant data. As you advance, you'll get to grips with tasks such as data preparation, exploring and visualizing relationships, building models, and more. You will also work with models such as K-Nearest Neighbors (KNN), random forests, and neural networks using key libraries in Python's data science stack including NumPy, pandas, Matplotlib, and Seaborn. All along, you'll explore useful examples and Python code that will help you grasp the concepts and techniques effectively. In addition to this, you'll gain detailed insights into the core techniques and algorithms used in predictive analytics. By the end of this book, you will be equipped with the skills you need to build high-performance predictive analytics solutions using Python programming. What you will learnGet to grips with the core concepts and principles of predictive analyticsExplore the stages involved in producing complete predictive analytics solutionsUnderstand how to define a problem, propose a solution, and prepare a datasetUse visualizations to explore relationships and gain insights into a datasetUse Keras to build powerful neural network models that produce accurate predictionsBuild regression and classification models using scikit-learnWho 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 are interested in implementing predictive analytics solutions using Python's data stack. Anyone looking to get started in this exciting field will also find this book useful. Proficiency in Python programming and a basic understanding of statistics and college-level algebra are required. Table of ContentsThe Predictive Analytics ProcessProblem Understanding and Data PreparationDataset Understanding - Exploratory Data AnalysisPredicting Numerical Values with Machine LearningPredicting Categories with Machine LearningIntroducing Neural Nets for Predictive AnalyticsModel EvaluationModel Tuning and Improving PerformanceImplementing a Model with Dash Cover Title Page Copyright and Credits About Packt Contributors Table of Contents Preface Chapter 1: 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 Chapter 2: 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 Chapter 3: 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 Chapter 4: 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 Chapter 5: 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 Chapter 6: 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 Chapter 7: 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 Chapter 8: 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 Chapter 9: 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 Index
Similar books
The Statistics and Calculus with Python Workshop: A comprehensive introduction to mathematics in Python for artificial intelligence applications
2020 · PDF
Become a Python Data Analyst: Perform exploratory data analysis and gain insight into scientific computing using Python
MOBI
Become a Python Data Analyst: Perform exploratory data analysis and gain insight into scientific computing using Python
2018 · PDF
The Statistics and Calculus with Python Workshop: A comprehensive introduction to mathematics in Python for artificial intelligence applications
2020 · PDF
The Statistics and Calculus with Python Workshop
2020 · EPUB
Become a Python Data Analyst: Perform exploratory data analysis and gain insight into scientific computing using Python
2018 · EPUB
Become A Python Data Analyst
2018 · EPUB
MySQL® Notes for Professionals book
2018 · PDF