Gain practical insights by exploiting data in your business to build advanced predictive modeling applicationsKey Features A step-by-step guide to predictive modeling including lots of tips, tricks, and best practices Learn how to use popular predictive modeling algorithms such as Linear Regression, Decision Trees, Logistic Regression, and Clustering Master open source Python tools to build sophisticated predictive models Book DescriptionSocial Media and the Internet of Things have resulted in an avalanche of data. Data is powerful but not in its raw form; it needs to be processed and modeled, and Python is one of the most robust tools out there to do so. It has an array of packages for predictive modeling and a suite of IDEs to choose from. Using the Python programming language, analysts can use these sophisticated methods to build scalable analytic applications. This book is your guide to getting started with predictive analytics using Python.You'll balance both statistical and mathematical concepts, and implement them in Python using libraries such as pandas, scikit-learn, and NumPy. Through case studies and code examples using popular open-source Python libraries, this book illustrates the complete development process for analytic applications. Covering a wide range of algorithms for classification, regression, clustering, as well as cutting-edge techniques such as deep learning, this book illustrates explains how these methods work. You will learn to choose the right approach for your problem and how to develop engaging visualizations to bring to life the insights of predictive modeling.Finally, you will learn best practices in predictive modeling, as well as the different applications of predictive modeling in the modern world. The course provides you with highly practical content from the following Packt books:1. Learning Predictive Analytics with Python2. Mastering Predictive Analytics with PythonWhat you will learn Understand the statistical and mathematical concepts behind predictive analytics algorithms and implement them using Python libraries Get to know various methods for importing, cleaning, sub-setting, merging, joining, concatenating, exploring, grouping, and plotting data with pandas and NumPy Master the use of Python notebooks for exploratory data analysis and rapid prototyping Get to grips with applying regression, classification, clustering, and deep learning algorithms Discover advanced methods to analyze structured and unstructured data Visualize the performance of models and the insights they produce Ensure the robustness of your analytic applications by mastering the best practices of predictive analysis Table of Contents Getting Started with Predictive Modelling Data Cleaning Data Wrangling Statistical Concepts for Predictive Modelling Linear Regression with Python Logistic Regression with Python Clustering with Python Trees and Random Forests with Python Best Practices for Predictive Modelling A List of Links From Data to Decisions – Getting Started with Analytic Applications Exploratory Data Analysis and Visualization in Python Finding Patterns in the Noise – Clustering and Unsupervised Learning Connecting the Dots with Models – Regression Methods & Cover......Page 1 Table of Contents......Page 2 Python: Advanced Predictive Analytics......Page 10 Python: Advanced Predictive Analytics......Page 11 Credits......Page 13 Preface......Page 14 What you need for this learning path......Page 16 Who this learning path is for......Page 18 Reader feedback......Page 19 Customer support......Page 20 1. Module 1......Page 23 1. Getting Started with Predictive Modelling......Page 24 Applications and examples of predictive modelling......Page 35 Python and its packages – download and installation......Page 41 Python and its packages for predictive modelling......Page 47 IDEs for Python......Page 50 Summary......Page 54 2. Data Cleaning......Page 55 Various methods of importing data in Python......Page 59 Basics – summary, dimensions, and structure......Page 76 Handling missing values......Page 80 Creating dummy variables......Page 91 Visualizing a dataset by basic plotting......Page 93 Summary......Page 101 3. Data Wrangling......Page 103 Generating random numbers and their usage......Page 116 Grouping the data – aggregation, filtering, and transformation......Page 140 Random sampling – splitting a dataset in training and testing datasets......Page 155 Concatenating and appending data......Page 160 Merging/joining datasets......Page 173 Summary......Page 192 4. Statistical Concepts for Predictive Modelling......Page 194 Hypothesis testing......Page 197 Chi-square tests......Page 209 Correlation......Page 215 Summary......Page 223 5. Linear Regression with Python......Page 224 Making sense of result parameters......Page 242 Implementing linear regression with Python......Page 247 Model validation......Page 265 Handling other issues in linear regression......Page 275 Summary......Page 305 6. Logistic Regression with Python......Page 307 Understanding the math behind logistic regression......Page 310 Implementing logistic regression with Python......Page 334 Model validation and evaluation......Page 352 Model validation......Page 358 Summary......Page 368 7. Clustering with Python......Page 370 Mathematics behind clustering......Page 376 Implementing clustering using Python......Page 394 Fine-tuning the clustering......Page 406 Summary......Page 411 8. Trees and Random Forests with Python......Page 412 Understanding the mathematics behind decision trees......Page 419 Implementing a decision tree with scikit-learn......Page 435 Understanding and implementing regression trees......Page 445 Understanding and implementing random forests......Page 453 Summary......Page 460 9. Best Practices for Predictive Modelling......Page 462 Best practices for data handling......Page 474 Best practices for algorithms......Page 476 Best practices for statistics......Page 478 Best practices for business contexts......Page 480 Summary......Page 482 A. A List of Links......Page 483 2. Module 2......Page 485 1. From Data to Decisions – Getting Started with Analytic Applications......Page 486 Case study: sentiment analysis of social media feeds......Page 509 Case study: targeted e-mail campaigns......Page 513 Summary......Page 519 2. Exploratory Data Analysis and Visualization in Python......Page 521 Time series analysis......Page 547 Working with geospatial data......Page 556 Introduction to PySpark......Page 561 Summary......Page 569 3. Finding Patterns in the Noise – Clustering and Unsupervised Learning......Page 570 Affinity propagation – automatically choosing cluster numbers......Page 606 k-medoids......Page 612 Agglomerative clustering......Page 614 Streaming clustering in Spark......Page 624 Summary......Page 630 4. Connecting the Dots with Models – Regression Methods......Page 631 Tree methods......Page 672 Scaling out with PySpark – predicting year of song release......Page 687 Summary......Page 691 5. Putting Data in its Place – Classification Methods and Analysis......Page 692 Fitting the model......Page 719 Evaluating classification models......Page 723 Separating Nonlinear boundaries with Support vector machines......Page 735 Comparing classification methods......Page 749 Case study: fitting classifier models in pyspark......Page 752 Summary......Page 756 6. Words and Pixels – Working with Unstructured Data......Page 757 Principal component analysis......Page 770 Images......Page 795 Case Study: Training a Recommender System in PySpark......Page 810 Summary......Page 815 7. Learning from the Bottom Up – Deep Networks and Unsupervised Features......Page 816 The TensorFlow library and digit recognition......Page 854 Summary......Page 864 8. Sharing Models with Prediction Services......Page 865 Clients and making requests......Page 870 Server – the web traffic controller......Page 877 Persisting information with database systems......Page 881 Case study – logistic regression service......Page 885 Summary......Page 917 9. Reporting and Testing – Iterating on Analytic Systems......Page 918 Iterating on models through A/B testing......Page 931 Guidelines for communication......Page 942 Summary......Page 955 Bibliography......Page 956 Index......Page 957 Gain practical insights by exploiting data in your business to build advanced predictive modeling applications Key Features A step-by-step guide to predictive modeling including lots of tips, tricks, and best practices Learn how to use popular predictive modeling algorithms such as Linear Regression, Decision Trees, Logistic Regression, and Clustering Master open source Python tools to build sophisticated predictive models Book Description Social Media and the Internet of Things have resulted in an avalanche of data. Data is powerful but not in its raw form; it needs to be processed and modeled, and Python is one of the most robust tools out there to do so. It has an array of packages for predictive modeling and a suite of IDEs to choose from. Using the Python programming language, analysts can use these sophisticated methods to build scalable analytic applications. This book is your guide to getting started with predictive analytics using Python. You'll balance both statistical and mathematical concepts, and implement them in Python using libraries such as pandas, scikit-learn, and NumPy. Through case studies and code examples using popular open-source Python libraries, this book illustrates the complete development process for analytic applications. Covering a wide range of algorithms for classification, regression, clustering, as well as cutting-edge techniques such as deep learning, this book illustrates explains how these methods work. You will learn to choose the right approach for your problem and how to develop engaging visualizations to bring to life the insights of predictive modeling. Finally, you will learn best practices in predictive modeling, as well as the different applications of predictive modeling in the modern world. The course provides you with highly practical content from the following Packt books: 1. Learning Predictive Analytics with Python 2. Mastering Predictive Analytics with Python What you will learn Understand the statistical and mathematical concepts behind predictive analytics algorithms and implement them using Python libraries Get to know various methods for importing, cleaning, sub-setting, merging, joining, concatenating, exploring, grouping, and plotting data with pandas and NumPy Master the use of Python notebooks for exploratory data analysis and rapid prototyping Get to grips with applying regression, classification, clustering, and deep learning algorithms Discover advanced methods to analyze structured and unstructured data Visualize the performance of models and the insights they produce Ensure the robustness of your analytic applications by mastering the best practices of predictive analysis Who this book is for This book is designed for business analysts, BI analysts, data scientists, or junior level data analysts who are ready to move on from a conceptual understanding of advanced analytics and become an expert in designing and building advanced analytics solutions using Python. If you are familiar with coding in Python (or some other programming/statistical/scripting language) but have never used or read about predictive analytics algorithms, this book will also help you. Gain practical insights by exploiting data in your business to build advanced predictive modeling applications About This Book A step-by-step guide to predictive modeling including lots of tips, tricks, and best practices Learn how to use popular predictive modeling algorithms such as Linear Regression, Decision Trees, Logistic Regression, and Clustering Master open source Python tools to build sophisticated predictive models Who This Book Is For This book is designed for business analysts, BI analysts, data scientists, or junior level data analysts who are ready to move on from a conceptual understanding of advanced analytics and become an expert in designing and building advanced analytics solutions using Python. If you are familiar with coding in Python (or some other programming/statistical/scripting language) but have never used or read about predictive analytics algorithms, this book will also help you. What You Will Learn Understand the statistical and mathematical concepts behind predictive analytics algorithms and implement them using Python libraries Get to know various methods for importing, cleaning, sub-setting, merging, joining, concatenating, exploring, grouping, and plotting data with pandas and NumPy Master the use of Python notebooks for exploratory data analysis and rapid prototyping Get to grips with applying regression, classification, clustering, and deep learning algorithms Discover advanced methods to analyze structured and unstructured data Visualize the performance of models and the insights they produce Ensure the robustness of your analytic applications by mastering the best practices of predictive analysis In Detail Social Media and the Internet of Things have resulted in an avalanche of data. Data is powerful but not in its raw form; it needs to be processed and modeled, and Python is one of the most robust tools out there to do so. It has an array of packages for predictive modeling and a suite of IDEs to choose from. Using the Python programming language, analysts can use these sophisticated methods to build scalable analytic applications. This book is your guide to getting started with predictive analytics using Python. You'll balance both statistical and mathematical concepts, and implement them in Python using libraries such as pandas, scikit-learn, and NumPy. Through case studies and code examples using popular open-source Python libraries, this book illustrates the complete development process for analytic ..