Details

Python Machine Learning


Python Machine Learning


1. Aufl.

von: Wei-Meng Lee

27,99 €

Verlag: Wiley
Format: EPUB
Veröffentl.: 04.04.2019
ISBN/EAN: 9781119545675
Sprache: englisch
Anzahl Seiten: 320

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

Beschreibungen

<p><b>Python makes machine learning easy for beginners and experienced developers</b></p> <p>With computing power increasing exponentially and costs decreasing at the same time, there is no better time to learn machine learning using Python. Machine learning tasks that once required enormous processing power are now possible on desktop machines. However, machine learning is not for the faint of heart—it requires a good foundation in statistics, as well as programming knowledge. <i>Python Machine Learning</i> will help coders of all levels master one of the most in-demand programming skillsets in use today. </p> <p>Readers will get started by following fundamental topics such as an introduction to Machine Learning and Data Science. For each learning algorithm, readers will use a real-life scenario to show how Python is used to solve the problem at hand.</p> <p>•          Python data science—manipulating data and data visualization</p> <p>•          Data cleansing</p> <p>•          Understanding Machine learning algorithms<br /> •          Supervised learning algorithms</p> <p>•          Unsupervised learning algorithms</p> <p>•          Deploying machine learning models </p> <p><i>Python Machine Learning</i> is essential reading for students, developers, or anyone with a keen interest in taking their coding skills to the next level. </p>
<p>Introduction xxiii</p> <p><b>Chapter 1 Introduction to Machine Learning 1</b></p> <p>What Is Machine Learning? 2</p> <p>What Problems Will Machine Learning Be Solving in This Book? 3</p> <p>Classification 4</p> <p>Regression 4</p> <p>Clustering 5</p> <p>Types of Machine Learning Algorithms 5</p> <p>Supervised Learning 5</p> <p>Unsupervised Learning 7</p> <p>Getting the Tools 8</p> <p>Obtaining Anaconda 8</p> <p>Installing Anaconda 9</p> <p>Running Jupyter Notebook for Mac 9</p> <p>Running Jupyter Notebook for Windows 10</p> <p>Creating a New Notebook 11</p> <p>Naming the Notebook 12</p> <p>Adding and Removing Cells 13</p> <p>Running a Cell 14</p> <p>Restarting the Kernel 16</p> <p>Exporting Your Notebook 16</p> <p>Getting Help 17</p> <p><b>Chapter 2 Extending Python Using NumPy 19</b></p> <p>What Is NumPy? 19</p> <p>Creating NumPy Arrays 20</p> <p>Array Indexing 22</p> <p>Boolean Indexing 22</p> <p>Slicing Arrays 23</p> <p>NumPy Slice Is a Reference 25</p> <p>Reshaping Arrays 26</p> <p>Array Math 27</p> <p>Dot Product 29</p> <p>Matrix 30</p> <p>Cumulative Sum 31</p> <p>NumPy Sorting 32</p> <p>Array Assignment 34</p> <p>Copying by Reference 34</p> <p>Copying by View (Shallow Copy) 36</p> <p>Copying by Value (Deep Copy) 37</p> <p><b>Chapter 3 Manipulating Tabular Data Using Pandas 39</b></p> <p>What Is Pandas? 39</p> <p>Pandas Series 40</p> <p>Creating a Series Using a Specified Index 41</p> <p>Accessing Elements in a Series 41</p> <p>Specifying a Datetime Range as the Index of a Series 42</p> <p>Date Ranges 43</p> <p>Pandas DataFrame 45</p> <p>Creating a DataFrame 45</p> <p>Specifying the Index in a DataFrame 46</p> <p>Generating Descriptive Statistics on the DataFrame 47</p> <p>Extracting from DataFrames 49</p> <p>Selecting the First and Last Five Rows 49</p> <p>Selecting a Specific Column in a DataFrame 50</p> <p>Slicing Based on Row Number 50</p> <p>Slicing Based on Row and Column Numbers 51</p> <p>Slicing Based on Labels 52</p> <p>Selecting a Single Cell in a DataFrame 54</p> <p>Selecting Based on Cell Value 54</p> <p>Transforming DataFrames 54</p> <p>Checking to See If a Result Is a DataFrame or Series 55</p> <p>Sorting Data in a DataFrame 55</p> <p>Sorting by Index 55</p> <p>Sorting by Value 56</p> <p>Applying Functions to a DataFrame 57</p> <p>Adding and Removing Rows and Columns in a DataFrame 60</p> <p>Adding a Column 61</p> <p>Removing Rows 61</p> <p>Removing Columns 62</p> <p>Generating a Crosstab 63</p> <p><b>Chapter 4 Data Visualization Using matplotlib 67</b></p> <p>What Is matplotlib? 67</p> <p>Plotting Line Charts 68</p> <p>Adding Title and Labels 69</p> <p>Styling 69</p> <p>Plotting Multiple Lines in the Same Chart 71</p> <p>Adding a Legend 72</p> <p>Plotting Bar Charts 73</p> <p>Adding Another Bar to the Chart 74</p> <p>Changing the Tick Marks 75</p> <p>Plotting Pie Charts 77</p> <p>Exploding the Slices 78</p> <p>Displaying Custom Colors 79</p> <p>Rotating the Pie Chart 80</p> <p>Displaying a Legend 81</p> <p>Saving the Chart 82</p> <p>Plotting Scatter Plots 83</p> <p>Combining Plots 83</p> <p>Subplots 84</p> <p>Plotting Using Seaborn 85</p> <p>Displaying Categorical Plots 86</p> <p>Displaying Lmplots 88</p> <p>Displaying Swarmplots 90</p> <p><b>Chapter 5 Getting Started with Scikit-learn for Machine Learning 93</b></p> <p>Introduction to Scikit-learn 93</p> <p>Getting Datasets 94</p> <p>Using the Scikit-learn Dataset 94</p> <p>Using the Kaggle Dataset 97</p> <p>Using the UCI (University of California, Irvine) Machine Learning Repository 97</p> <p>Generating Your Own Dataset 98</p> <p>Linearly Distributed Dataset 98</p> <p>Clustered Dataset 98</p> <p>Clustered Dataset Distributed in Circular Fashion 100</p> <p>Getting Started with Scikit-learn 100</p> <p>Using the LinearRegression Class for Fitting the Model 101</p> <p>Making Predictions 102</p> <p>Plotting the Linear Regression Line 102</p> <p>Getting the Gradient and Intercept of the Linear Regression Line 103</p> <p>Examining the Performance of the Model by Calculating the Residual Sum of Squares 104</p> <p>Evaluating the Model Using a Test Dataset 105</p> <p>Persisting the Model 106</p> <p>Data Cleansing 107</p> <p>Cleaning Rows with NaNs 108</p> <p>Replacing NaN with the Mean of the Column 109</p> <p>Removing Rows 109</p> <p>Removing Duplicate Rows 110</p> <p>Normalizing Columns 112</p> <p>Removing Outliers 113</p> <p>Tukey Fences 113</p> <p>Z-Score 116</p> <p><b>Chapter 6 Supervised Learning—Linear Regression 119</b></p> <p>Types of Linear Regression 119</p> <p>Linear Regression 120</p> <p>Using the Boston Dataset 120</p> <p>Data Cleansing 125</p> <p>Feature Selection 126</p> <p>Multiple Regression 128</p> <p>Training the Model 131</p> <p>Getting the Intercept and Coefficients 133</p> <p>Plotting the 3D Hyperplane 133</p> <p>Polynomial Regression 135</p> <p>Formula for Polynomial Regression 138</p> <p>Polynomial Regression in Scikit-learn 138</p> <p>Understanding Bias and Variance 141</p> <p>Using Polynomial Multiple Regression on the Boston Dataset 144</p> <p>Plotting the 3D Hyperplane 146</p> <p><b>Chapter 7 Supervised Learning—Classification Using Logistic Regression 151</b></p> <p>What Is Logistic Regression? 151</p> <p>Understanding Odds 153</p> <p>Logit Function 153</p> <p>Sigmoid Curve 154</p> <p>Using the Breast Cancer Wisconsin (Diagnostic) Data Set 156</p> <p>Examining the Relationship Between Features 156</p> <p>Plotting the Features in 2D 157</p> <p>Plotting in 3D 158</p> <p>Training Using One Feature 161</p> <p>Finding the Intercept and Coefficient 162</p> <p>Plotting the Sigmoid Curve 162</p> <p>Making Predictions 163</p> <p>Training the Model Using All Features 164</p> <p>Testing the Model 166</p> <p>Getting the Confusion Matrix 166</p> <p>Computing Accuracy, Recall, Precision, and Other Metrics 168</p> <p>Receiver Operating Characteristic (ROC) Curve 171</p> <p>Plotting the ROC and Finding the Area Under the Curve (AUC) 174</p> <p><b>Chapter 8 Supervised Learning—Classification Using Support Vector Machines 177</b></p> <p>What Is a Support Vector Machine? 177</p> <p>Maximum Separability 178</p> <p>Support Vectors 179</p> <p>Formula for the Hyperplane 180</p> <p>Using Scikit-learn for SVM 181</p> <p>Plotting the Hyperplane and the Margins 184</p> <p>Making Predictions 185</p> <p>Kernel Trick 186</p> <p>Adding a Third Dimension 187</p> <p>Plotting the 3D Hyperplane 189</p> <p>Types of Kernels 191</p> <p>C 194</p> <p>Radial Basis Function (RBF) Kernel 196</p> <p>Gamma 197</p> <p>Polynomial Kernel 199</p> <p>Using SVM for Real-Life Problems 200</p> <p><b>Chapter 9 Supervised Learning—Classification Using K-Nearest Neighbors (KNN) 205</b></p> <p>What Is K-Nearest Neighbors? 205</p> <p>Implementing KNN in Python 206</p> <p>Plotting the Points 206</p> <p>Calculating the Distance Between the Points 207</p> <p>Implementing KNN 208</p> <p>Making Predictions 209</p> <p>Visualizing Different Values of K 209</p> <p>Using Scikit-Learn’s KNeighborsClassifier Class for KNN 211</p> <p>Exploring Different Values of K 213</p> <p>Cross-Validation 216</p> <p>Parameter-Tuning K 217</p> <p>Finding the Optimal K 218</p> <p><b>Chapter 10 Unsupervised Learning—Clustering Using K-Means 221</b></p> <p>What Is Unsupervised Learning? 221</p> <p>Unsupervised Learning Using K-Means 222</p> <p>How Clustering in K-Means Works 222</p> <p>Implementing K-Means in Python 225</p> <p>Using K-Means in Scikit-learn 230</p> <p>Evaluating Cluster Size Using the Silhouette Coefficient 232</p> <p>Calculating the Silhouette Coefficient 233</p> <p>Finding the Optimal K 234</p> <p>Using K-Means to Solve Real-Life Problems 236</p> <p>Importing the Data 237</p> <p>Cleaning the Data 237</p> <p>Plotting the Scatter Plot 238</p> <p>Clustering Using K-Means 239</p> <p>Finding the Optimal Size Classes 240</p> <p><b>Chapter 11 Using Azure Machine Learning Studio 243</b></p> <p>What Is Microsoft Azure Machine Learning Studio? 243</p> <p>An Example Using the Titanic Experiment 244</p> <p>Using Microsoft Azure Machine Learning Studio 246</p> <p>Uploading Your Dataset 247</p> <p>Creating an Experiment 248</p> <p>Filtering the Data and Making Fields Categorical 252</p> <p>Removing the Missing Data 254</p> <p>Splitting the Data for Training and Testing 254</p> <p>Training a Model 256</p> <p>Comparing Against Other Algorithms 258</p> <p>Evaluating Machine Learning Algorithms 260</p> <p>Publishing the Learning Model as a Web Service 261</p> <p>Publishing the Experiment 261</p> <p>Testing the Web Service 263</p> <p>Programmatically Accessing the Web Service 263</p> <p><b>Chapter 12 Deploying Machine Learning Models 269</b></p> <p>Deploying ML 269</p> <p>Case Study 270</p> <p>Loading the Data 271</p> <p>Cleaning the Data 271</p> <p>Examining the Correlation Between the Features 273</p> <p>Plotting the Correlation Between Features 274</p> <p>Evaluating the Algorithms 277</p> <p>Logistic Regression 277</p> <p>K-Nearest Neighbors 277</p> <p>Support Vector Machines 278</p> <p>Selecting the Best Performing Algorithm 279</p> <p>Training and Saving the Model 279</p> <p>Deploying the Model 280</p> <p>Testing the Model 282</p> <p>Creating the Client Application to Use the Model 283</p> <p>Index 285</p>
<b>Wei-Meng Lee</b> is a technologist and founder of Developer Learning Solutions (http://www.learn2develop.net), a technology company specializing in hands-on training on the latest mobile technologies. Wei-Meng has many years of training experiences and his training courses place special emphasis on the learning-by-doing approach. His hands-on approach to learning programming makes understanding the subject much easier than reading books, tutorials, and documentations. His name regularly appears in online and print publications such as DevX.com, MobiForge.com, and <i>CoDe Magazine</i>.

Diese Produkte könnten Sie auch interessieren:

Software Process Modeling
Software Process Modeling
von: Silvia T. Acuna, Natalia Juristo
PDF ebook
96,29 €
A Software Process Model Handbook for Incorporating People's Capabilities
A Software Process Model Handbook for Incorporating People's Capabilities
von: Silvia T. Acuna, Natalia Juristo, Ana Maria Moreno, Alicia Mon
PDF ebook
149,79 €
XML for Bioinformatics
XML for Bioinformatics
von: Ethan Cerami
PDF ebook
53,49 €