Details

Machine Learning with Spark and Python


Machine Learning with Spark and Python

Essential Techniques for Predictive Analytics
2. Aufl.

von: Michael Bowles

32,99 €

Verlag: Wiley
Format: EPUB
Veröffentl.: 15.10.2019
ISBN/EAN: 9781119561958
Sprache: englisch
Anzahl Seiten: 368

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<p><i>Machine Learning with Spark and Python Essential Techniques for Predictive Analytics, Second Edition</i> simplifies ML for practical uses by focusing on two key algorithms. This new second edition improves with the addition of Spark—a ML framework from the Apache foundation. By implementing Spark, machine learning students can easily process much large data sets and call the spark algorithms using ordinary Python code.<br />  <br /> <i>Machine Learning with Spark and Python</i> focuses on two algorithm families (linear methods and ensemble methods) that effectively predict outcomes. This type of problem covers many use cases such as what ad to place on a web page, predicting prices in securities markets, or detecting credit card fraud. The focus on two families gives enough room for full descriptions of the mechanisms at work in the algorithms. Then the code examples serve to illustrate the workings of the machinery with specific hackable code.</p>
<p>Introduction xxi</p> <p><b>Chapter 1 The Two Essential Algorithms for Making Predictions 1</b></p> <p>Why are These Two Algorithms So Useful? 2</p> <p>What are Penalized Regression Methods? 7</p> <p>What are Ensemble Methods? 9</p> <p>How to Decide Which Algorithm to Use 11</p> <p>The Process Steps for Building a Predictive Model 13</p> <p>Framing a Machine Learning Problem 15</p> <p>Feature Extraction and Feature Engineering 17</p> <p>Determining Performance of a Trained Model 18</p> <p>Chapter Contents and Dependencies 18</p> <p>Summary 20</p> <p><b>Chapter 2 Understand the Problem by Understanding the Data 23</b></p> <p>The Anatomy of a New Problem 24</p> <p>Different Types of Attributes and Labels Drive Modeling Choices 26</p> <p>Things to Notice about Your New Data Set 27</p> <p>Classification Problems: Detecting Unexploded Mines Using Sonar 28</p> <p>Physical Characteristics of the Rocks Versus Mines Data Set 29</p> <p>Statistical Summaries of the Rocks Versus Mines Data Set 32</p> <p>Visualization of Outliers Using a Quantile-Quantile Plot 34</p> <p>Statistical Characterization of Categorical Attributes 35</p> <p>How to Use Python Pandas to Summarize the Rocks Versus Mines Data Set 36</p> <p>Visualizing Properties of the Rocks Versus Mines Data Set 39</p> <p>Visualizing with Parallel Coordinates Plots 39</p> <p>Visualizing Interrelationships between Attributes and Labels 41</p> <p>Visualizing Attribute and Label Correlations Using a Heat Map 48</p> <p>Summarizing the Process for Understanding the Rocks Versus Mines Data Set 50</p> <p>Real-Valued Predictions with Factor Variables: How Old is Your Abalone? 50</p> <p>Parallel Coordinates for Regression Problems—Visualize Variable Relationships for the Abalone Problem 55</p> <p>How to Use a Correlation Heat Map for Regression—Visualize Pair-Wise Correlations for the Abalone Problem 59</p> <p>Real-Valued Predictions Using Real-Valued Attributes: Calculate How Your Wine Tastes 61</p> <p>Multiclass Classification Problem: What Type of Glass is That? 67</p> <p>Using PySpark to Understand Large Data Sets 72</p> <p>Summary 75</p> <p><b>Chapter 3 Predictive Model Building: Balancing Performance, Complexity, and Big Data 77</b></p> <p>The Basic Problem: Understanding Function Approximation 78</p> <p>Working with Training Data 79</p> <p>Assessing Performance of Predictive Models 81</p> <p>Factors Driving Algorithm Choices and Performance—Complexity and Data 82</p> <p>Contrast between a Simple Problem and a Complex Problem 82</p> <p>Contrast between a Simple Model and a Complex Model 85</p> <p>Factors Driving Predictive Algorithm Performance 89</p> <p>Choosing an Algorithm: Linear or Nonlinear? 90</p> <p>Measuring the Performance of Predictive Models 91</p> <p>Performance Measures for Different Types of Problems 91</p> <p>Simulating Performance of Deployed Models 105</p> <p>Achieving Harmony between Model and Data 107</p> <p>Choosing a Model to Balance Problem Complexity, Model Complexity, and Data Set Size 107</p> <p>Using Forward Stepwise Regression to Control Overfitting 109</p> <p>Evaluating and Understanding Your Predictive Model 114</p> <p>Control Overfitting by Penalizing Regression Coefficients—Ridge Regression 116</p> <p>Using PySpark for Training Penalized Regression Models on Extremely Large Data Sets 124</p> <p>Summary 127</p> <p><b>Chapter 4 Penalized Linear Regression 129</b></p> <p>Why Penalized Linear Regression Methods are So Useful 130</p> <p>Extremely Fast Coefficient Estimation 130</p> <p>Variable Importance Information 131</p> <p>Extremely Fast Evaluation When Deployed 131</p> <p>Reliable Performance 131</p> <p>Sparse Solutions 132</p> <p>Problem May Require Linear Model 132</p> <p>When to Use Ensemble Methods 132</p> <p>Penalized Linear Regression: Regulating Linear Regression for Optimum Performance 132</p> <p>Training Linear Models: Minimizing Errors and More 135</p> <p>Adding a Coefficient Penalty to the OLS Formulation 136</p> <p>Other Useful Coefficient Penalties—Manhattan and ElasticNet 137</p> <p>Why Lasso Penalty Leads to Sparse Coefficient Vectors 138</p> <p>ElasticNet Penalty Includes Both Lasso and Ridge 140</p> <p>Solving the Penalized Linear Regression Problem 141</p> <p>Understanding Least Angle Regression and Its Relationship to Forward Stepwise Regression 141</p> <p>How LARS Generates Hundreds of Models of Varying Complexity 145</p> <p>Choosing the Best Model from the Hundreds LARS Generates 147</p> <p>Using Glmnet: Very Fast and Very General 152</p> <p>Comparison of the Mechanics of Glmnet and LARS Algorithms 153</p> <p>Initializing and Iterating the Glmnet Algorithm 153</p> <p>Extension of Linear Regression to Classification Problems 157</p> <p>Solving Classification Problems with Penalized Regression 157</p> <p>Working with Classification Problems Having More Than Two Outcomes 161</p> <p>Understanding Basis Expansion: Using Linear Methods on Nonlinear Problems 161</p> <p>Incorporating Non-Numeric Attributes into Linear Methods 163</p> <p>Summary 166</p> <p><b>Chapter 5 Building Predictive Models Using Penalized Linear Methods 169</b></p> <p>Python Packages for Penalized Linear Regression 170</p> <p>Multivariable Regression: Predicting Wine Taste 171</p> <p>Building and Testing a Model to Predict Wine Taste 172</p> <p>Training on the Whole Data Set before Deployment 175</p> <p>Basis Expansion: Improving Performance by Creating New Variables from Old Ones 179</p> <p>Binary Classification: Using Penalized Linear Regression to Detect Unexploded Mines 182</p> <p>Build a Rocks Versus Mines Classifier for Deployment 191</p> <p>Multiclass Classification: Classifying Crime Scene Glass Samples 200</p> <p>Linear Regression and Classification Using PySpark 203</p> <p>Using PySpark to Predict Wine Taste 204</p> <p>Logistic Regression with PySpark: Rocks Versus Mines 208</p> <p>Incorporating Categorical Variables in a PySpark Model: Predicting Abalone Rings 213</p> <p>Multiclass Logistic Regression with Meta Parameter Optimization 217</p> <p>Summary 219</p> <p><b>Chapter 6 Ensemble Methods 221</b></p> <p>Binary Decision Trees 222</p> <p>How a Binary Decision Tree Generates Predictions 224</p> <p>How to Train a Binary Decision Tree 225</p> <p>Tree Training Equals Split Point Selection 227</p> <p>How Split Point Selection Affects Predictions 228</p> <p>Algorithm for Selecting Split Points 229</p> <p>Multivariable Tree Training—Which Attribute to Split? 229</p> <p>Recursive Splitting for More Tree Depth 230</p> <p>Overfitting Binary Trees 231</p> <p>Measuring Overfit with Binary Trees 231</p> <p>Balancing Binary Tree Complexity for Best Performance 232</p> <p>Modifi cations for Classification and Categorical Features 235</p> <p>Bootstrap Aggregation: “Bagging” 235</p> <p>How Does the Bagging Algorithm Work? 236</p> <p>Bagging Performance—Bias Versus Variance 239</p> <p>How Bagging Behaves on Multivariable Problem 241</p> <p>Bagging Needs Tree Depth for Performance 245</p> <p>Summary of Bagging 246</p> <p>Gradient Boosting 246</p> <p>Basic Principle of Gradient Boosting Algorithm 246</p> <p>Parameter Settings for Gradient Boosting 249</p> <p>How Gradient Boosting Iterates toward a Predictive Model 249</p> <p>Getting the Best Performance from Gradient Boosting 250</p> <p>Gradient Boosting on a Multivariable Problem 253</p> <p>Summary for Gradient Boosting 256</p> <p>Random Forests 256</p> <p>Random Forests: Bagging Plus Random Attribute Subsets 259</p> <p>Random Forests Performance Drivers 260</p> <p>Random Forests Summary 261</p> <p>Summary 262</p> <p><b>Chapter 7 Building Ensemble Models with Python 265</b></p> <p>Solving Regression Problems with Python Ensemble Packages 265</p> <p>Using Gradient Boosting to Predict Wine Taste 266</p> <p>Using the Class Constructor for GradientBoostingRegressor 266</p> <p>Using GradientBoostingRegressor to Implement a Regression Model 268</p> <p>Assessing the Performance of a Gradient Boosting Model 271</p> <p>Building a Random Forest Model to Predict Wine Taste 272</p> <p>Constructing a RandomForestRegressor Object 273</p> <p>Modeling Wine Taste with RandomForestRegressor 275</p> <p>Visualizing the Performance of a Random Forest Regression Model 279</p> <p>Incorporating Non-Numeric Attributes in Python Ensemble Models 279</p> <p>Coding the Sex of Abalone for Gradient Boosting Regression in Python 280</p> <p>Assessing Performance and the Importance of Coded Variables with Gradient Boosting 282</p> <p>Coding the Sex of Abalone for Input to Random Forest Regression in Python 284</p> <p>Assessing Performance and the Importance of Coded Variables 287</p> <p>Solving Binary Classification Problems with Python Ensemble Methods 288</p> <p>Detecting Unexploded Mines with Python Gradient Boosting 288</p> <p>Determining the Performance of a Gradient Boosting Classifier 291</p> <p>Detecting Unexploded Mines with Python Random Forest 292</p> <p>Constructing a Random Forest Model to Detect Unexploded Mines 294</p> <p>Determining the Performance of a Random Forest Classifier 298</p> <p>Solving Multiclass Classification Problems with Python Ensemble Methods 300</p> <p>Dealing with Class Imbalances 301</p> <p>Classifying Glass Using Gradient Boosting 301</p> <p>Determining the Performance of the Gradient Boosting Model on Glass Classification 306</p> <p>Classifying Glass with Random Forests 307</p> <p>Determining the Performance of the Random Forest Model on Glass Classification 310</p> <p>Solving Regression Problems with PySpark Ensemble Packages 311</p> <p>Predicting Wine Taste with PySpark Ensemble Methods 312</p> <p>Predicting Abalone Age with PySpark Ensemble Methods 317</p> <p>Distinguishing Mines from Rocks with PySpark</p> <p>Ensemble Methods 321</p> <p>Identifying Glass Types with PySpark Ensemble Methods 325</p> <p>Summary 327</p> <p>Index 329</p>
<p><b>MICHAEL BOWLES</b> teaches machine learning at UC Berkeley, University of New Haven and Hacker Dojo in Silicon Valley, consults on machine learning projects, and is involved in a number of startups in such areas as semi conductor inspection, drug design and optimization and trading in the financial markets. Following an assistant professorship at MIT, Michael went on to found and run two Silicon Valley startups, both of which went public. His courses are always popular and receive great feedback from participants.
<p><b>SIMPLE, EFFECTIVE WAY TO ANALYZE DATA AND PREDICT OUTCOMES WITH PYTHON</b> <p>Machine learning focuses on prediction—using what you know to predict what you would like to know based on historical relationships between the two. At its core, it's a mathematical/algorithm-based technology that, until recently, required a deep understanding of math and statistical concepts, and fluency in R and other specialized languages. <i>Machine Learning with Spark™ and Python<sup>®</sup></i> simplifies machine learning for a broader audience and wider application by focusing on two algorithm families that effectively predict outcomes, and by showing you how to apply them using the popular and accessible Python programming language. This edition shows how pyspark extends these two algorithms to extremely large data sets requiring multiple distributed processors. The same basic concepts apply. <p>Author Michael Bowles draws from years of machine learning expertise to walk you through the design, construction, and implementation of your own machine learning solutions. The algorithms are explained in simple terms with no complex math, and sample code is provided to help you get started right away. You'll delve deep into the mechanisms behind the constructs, and learn how to select and apply the algorithm that will best solve the problem at hand, whether simple or complex. Detailed examples illustrate the machinery with specific, hackable code, and descriptive coverage of penalized linear regression and ensemble methods helps you understand the fundamental processes at work in machine learning. The methods are effective and well tested, and the results speak for themselves. <p>Designed specifically for those without a specialized math or statistics background, <i>Machine Learning with Spark and Python</i> shows you how to: <ul> <li>Select the right algorithm for the job</li> <li>Learn the mechanisms and prepare the data</li> <li>Code demonstrates pyspark implementations scalable to big-data using hundreds of processors</li> <li>Master core Python machine learning packages</li> <li>Build versatile predictive models that work</li> <li>Apply trained models in practice for various uses</li> <li>Measure model performance for better QC and application</li> <li>Use provided sample code in Jupyter Notebook format to design and build your own model</li> </ul>

Diese Produkte könnten Sie auch interessieren:

MDX Solutions
MDX Solutions
von: George Spofford, Sivakumar Harinath, Christopher Webb, Dylan Hai Huang, Francesco Civardi
PDF ebook
53,99 €
Concept Data Analysis
Concept Data Analysis
von: Claudio Carpineto, Giovanni Romano
PDF ebook
107,99 €
Handbook of Virtual Humans
Handbook of Virtual Humans
von: Nadia Magnenat-Thalmann, Daniel Thalmann
PDF ebook
150,99 €