Details

Machine Learning


Machine Learning

Hands-On for Developers and Technical Professionals
2. Aufl.

von: Jason Bell

34,99 €

Verlag: Wiley
Format: EPUB
Veröffentl.: 17.02.2020
ISBN/EAN: 9781119642190
Sprache: englisch
Anzahl Seiten: 432

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

Beschreibungen

<b>Dig deep into the data with a hands-on guide to machine learning with updated examples and more!</b> <p><i>Machine Learning: Hands-On for Developers and Technical Professionals</i> provides hands-on instruction and fully-coded working examples for the most common machine learning techniques used by developers and technical professionals. The book contains a breakdown of each ML variant, explaining how it works and how it is used within certain industries, allowing readers to incorporate the presented techniques into their own work as they follow along. A core tenant of machine learning is a strong focus on data preparation, and a full exploration of the various types of learning algorithms illustrates how the proper tools can help any developer extract information and insights from existing data. The book includes a full complement of Instructor's Materials to facilitate use in the classroom, making this resource useful for students and as a professional reference.</p> <p>At its core, machine learning is a mathematical, algorithm-based technology that forms the basis of historical data mining and modern big data science. Scientific analysis of big data requires a working knowledge of machine learning, which forms predictions based on known properties learned from training data. <i>Machine Learning</i> is an accessible, comprehensive guide for the non-mathematician, providing clear guidance that allows readers to:</p> <ul> <li>Learn the languages of machine learning including Hadoop, Mahout, and Weka</li> <li>Understand decision trees, Bayesian networks, and artificial neural networks</li> <li>Implement Association Rule, Real Time, and Batch learning</li> <li>Develop a strategic plan for safe, effective, and efficient machine learning</li> </ul> <p>By learning to construct a system that can learn from data, readers can increase their utility across industries. Machine learning sits at the core of deep dive data analysis and visualization, which is increasingly in demand as companies discover the goldmine hiding in their existing data. For the tech professional involved in data science, <i>Machine Learning: Hands-On for Developers and Technical Professionals</i> provides the skills and techniques required to dig deeper.</p>
<p>Introduction xxvii</p> <p><b>Chapter 1 What is Machine Learning? 1</b></p> <p>History of Machine Learning 1</p> <p>Alan Turing 1</p> <p>Arthur Samuel 2</p> <p>Tom M. Mitchell 2</p> <p>Summary Definition 3</p> <p>Algorithm Types for Machine Learning 3</p> <p>Supervised Learning 3</p> <p>Unsupervised Learning 4</p> <p>The Human Touch 4</p> <p>Uses for Machine Learning 4</p> <p>Software 4</p> <p>Stock Trading 5</p> <p>Robotics 6</p> <p>Medicine and Healthcare 6</p> <p>Advertising 7</p> <p>Retail and E-commerce 7</p> <p>Gaming Analytics 9</p> <p>The Internet of Things 10</p> <p>Languages for Machine Learning 10</p> <p>Python 10</p> <p>R 11</p> <p>Matlab 11</p> <p>Scala 11</p> <p>Ruby 11</p> <p>Software Used in This Book 11</p> <p>Checking the Java Version 12</p> <p>Weka Toolkit 12</p> <p>DeepLearning4J 13</p> <p>Kafka 13</p> <p>Spark and Hadoop 13</p> <p>Text Editors and IDEs 13</p> <p>Data Repositories 14</p> <p>UC Irvine Machine Learning Repository 14</p> <p>Kaggle 14</p> <p>Summary 14</p> <p><b>Chapter 2 Planning for Machine Learning 15</b></p> <p>The Machine Learning Cycle 15</p> <p>It All Starts with a Question 16</p> <p>I Don’t Have Data! 16</p> <p>Starting Local 17</p> <p>Transfer Learning 17</p> <p>Competitions 17</p> <p>One Solution Fits All? 18</p> <p>Defining the Process 18</p> <p>Planning 18</p> <p>Developing 19</p> <p>Testing 19</p> <p>Reporting 19</p> <p>Refining 19</p> <p>Production 20</p> <p>Avoiding Bias 20</p> <p>Building a Data Team 20</p> <p>Mathematics and Statistics 20</p> <p>Programming 21</p> <p>Graphic Design 21</p> <p>Domain Knowledge 21</p> <p>Data Processing 22</p> <p>Using Your Computer 22</p> <p>A Cluster of Machines 22</p> <p>Cloud-Based Services 22</p> <p>Data Storage 23</p> <p>Physical Discs 23</p> <p>Cloud-Based Storage 23</p> <p>Data Privacy 23</p> <p>Cultural Norms 24</p> <p>Generational Expectations 24</p> <p>The Anonymity of User Data 25</p> <p>Don’t Cross the “Creepy Line” 25</p> <p>Data Quality and Cleaning 26</p> <p>Presence Checks 26</p> <p>Type Checks 27</p> <p>Length Checks 27</p> <p>Range Checks 28</p> <p>Format Checks 28</p> <p>The Britney Dilemma 28</p> <p>What’s in a Country Name? 31</p> <p>Dates and Times 33</p> <p>Final Thoughts on Data Cleaning 33</p> <p>Thinking About Input Data 34</p> <p>Raw Text 34</p> <p>Comma-Separated Variables 34</p> <p>JSON 35</p> <p>YAML 37</p> <p>XML 37</p> <p>Spreadsheets 38</p> <p>Databases 39</p> <p>Thinking About Output Data 39</p> <p>Don’t Be Afraid to Experiment 40</p> <p>Summary 40</p> <p><b>Chapter 3 Data Acquisition Techniques 43</b></p> <p>Scraping Data 43</p> <p>Copy and Paste 44</p> <p>Google Sheets 46</p> <p>Using an API 47</p> <p>Acquiring Weather Data 48</p> <p>Migrating Data 50</p> <p>Installing Embulk 51</p> <p>Using the Quick Run 51</p> <p>Installing Plugins 52</p> <p>Migrating Files to Database 53</p> <p>Bulk Converting CSV to JSON 55</p> <p>Summary 56</p> <p><b>Chapter 4 Statistics, Linear Regression, and Randomness 57</b></p> <p>Working with a Basic Dataset 57</p> <p>Loading and Converting the Dataset 58</p> <p>Introducing Basic Statistics 59</p> <p>Minimum and Maximum Values 60</p> <p>Sum 61</p> <p>Mean 62</p> <p>Arithmetic Mean 62</p> <p>Harmonic Mean 62</p> <p>Geometric Mean 63</p> <p>The Relationship Between the Three Averages 63</p> <p>Mode 65</p> <p>Median 66</p> <p>Range 67</p> <p>Interquartile Ranges 67</p> <p>Variance 68</p> <p>Standard Deviation 69</p> <p>Using Simple Linear Regression 70</p> <p>Using Your Spreadsheet 70</p> <p>Writing a Program 73</p> <p>Embracing Randomness 75</p> <p>Finding Pi with Random Numbers 76</p> <p>Using Monte Carlo Pi in Clojure 77</p> <p>Summary 80</p> <p><b>Chapter 5 Working with Decision Trees 81</b></p> <p>The Basics of Decision Trees 81</p> <p>Uses for Decision Trees 81</p> <p>Advantages of Decision Trees 82</p> <p>Limitations of Decision Trees 82</p> <p>Different Algorithm Types 82</p> <p>How Decision Trees Work 84</p> <p>Decision Trees in Weka 88</p> <p>The Requirement 88</p> <p>Training Data 89</p> <p>Using Weka to Create a Decision Tree 90</p> <p>Creating Java Code from the Classification 94</p> <p>Testing the Classifier Code 99</p> <p>Thinking About Future Iterations 101</p> <p>Summary 101</p> <p><b>Chapter 6 Clustering 103</b></p> <p>What is Clustering? 103</p> <p>Where is Clustering Used? 104</p> <p>The Internet 104</p> <p>Business and Retail 104</p> <p>Law Enforcement 105</p> <p>Computing 105</p> <p>Clustering Models 105</p> <p>How the K-Means Works 106</p> <p>Calculating the Number of Clusters in a Dataset 108</p> <p>K-Means Clustering with Weka 110</p> <p>Preparing the Data 110</p> <p>The Workbench Method 111</p> <p>The Command-Line Method 116</p> <p>Converting CSV File to ARFF 116</p> <p>The Coded Method 120</p> <p>Summary 128</p> <p><b>Chapter 7 Association Rules Learning 129</b></p> <p>Where is Association Rules Learning Used? 129</p> <p>Web Usage Mining 130</p> <p>Beer and Diapers 130</p> <p>How Association Rules Learning Works 131</p> <p>Support 133</p> <p>Confidence 133</p> <p>Lift 134</p> <p>Conviction 134</p> <p>Defining the Process 134</p> <p>Algorithms 135</p> <p>Apriori 135</p> <p>FP-Growth 136</p> <p>Mining the Baskets—A Walk-Through 136</p> <p>The Raw Basket Data 136</p> <p>Using the Weka Application 137</p> <p>Inspecting the Results 141</p> <p>Summary 142</p> <p><b>Chapter 8 Support Vector Machines 143</b></p> <p>What is a Support Vector Machine? 143</p> <p>Where are Support Vector Machines Used? 144</p> <p>The Basic Classification Principles 144</p> <p>Binary and Multiclass Classification 144</p> <p>Linear Classifiers 146</p> <p>Confidence 147</p> <p>Maximizing and Minimizing to Find the Line 147</p> <p>How Support Vector Machines Approach Classification 148</p> <p>Using Linear Classification 148</p> <p>Using Non-Linear Classification 150</p> <p>Using Support Vector Machines in Weka 151</p> <p>Installing LibSVM 151</p> <p>A Classification Walk-Through 152</p> <p>Implementing LibSVM with Java 158</p> <p>Summary 164</p> <p><b>Chapter 9 Artificial Neural Networks 165</b></p> <p>What is a Neural Network? 165</p> <p>Artificial Neural Network Uses 166</p> <p>High-Frequency Trading 166</p> <p>Credit Applications 167</p> <p>Data Center Management 167</p> <p>Robotics 167</p> <p>Medical Monitoring 168</p> <p>Trusting the Black Box 168</p> <p>Breaking Down the Artificial Neural Network 169</p> <p>Perceptrons 169</p> <p>Activation Functions 170</p> <p>Multilayer Perceptrons 171</p> <p>Back Propagation 173</p> <p>Data Preparation for Artificial Neural Networks 174</p> <p>Artificial Neural Networks with Weka 175</p> <p>Generating a Dataset 175</p> <p>Loading the Data into Weka 177</p> <p>Configuring the Multilayer Perceptron 178</p> <p>Training the Network 180</p> <p>Altering the Network 182</p> <p>Increasing the Test Data Size 183</p> <p>Implementing a Neural Network in Java 183</p> <p>Creating the Project 183</p> <p>Writing the Code 185</p> <p>Converting from CSV to Arff 188</p> <p>Running the Neural Network 188</p> <p>Developing Neural Networks with DeepLearning4J 189</p> <p>Modifying the Data 189</p> <p>Viewing Maven Dependencies 190</p> <p>Handling the Training Data 191</p> <p>Normalizing Data 191</p> <p>Building the Model 192</p> <p>Evaluating the Model 193</p> <p>Saving the Model 193</p> <p>Building and Executing the Program 194</p> <p>Summary 195</p> <p><b>Chapter 10 Machine Learning with Text Documents 197</b></p> <p>Preparing Text for Analysis 198</p> <p>Apache Tika 198</p> <p>Cleaning the Text Data 203</p> <p>Stopwords 205</p> <p>Stemming 206</p> <p>N-grams 206</p> <p>TF/IDF 207</p> <p>Loading the Documents 207</p> <p>Calculating the Term Frequency 208</p> <p>Calculating the Inverse Document Frequency 208</p> <p>Computing the TF/IDF Score 209</p> <p>Reviewing the Final Code Listing 209</p> <p>Word2Vec 211</p> <p>Loading the Raw Text Data 212</p> <p>Tokenizing the Strings 212</p> <p>Creating the Model 212</p> <p>Evaluating the Model 213</p> <p>Reviewing the Final Code 214</p> <p>Basic Sentiment Analysis 216</p> <p>Loading Positive and Negative Words 216</p> <p>Loading Sentences 217</p> <p>Calculating the Sentiment Score 217</p> <p>Reviewing the Final Code 218</p> <p>Performing a Test Run 220</p> <p>Further Development 220</p> <p>Summary 221</p> <p><b>Chapter 11 Machine Learning with Images 223</b></p> <p>What is an Image? 223</p> <p>Introducing Color Depth 224</p> <p>Images in Machine Learning 225</p> <p>Basic Classifi cation with Neural Networks 226</p> <p>Basic Settings 226</p> <p>Loading the MNIST Images 226</p> <p>Model Configuration 227</p> <p>Model Training 228</p> <p>Model Evaluation 228</p> <p>Convolutional Neural Networks 228</p> <p>How CNNs Work 228</p> <p>CNN Demonstration 231</p> <p>Downloading the Image Data 231</p> <p>Basic Setup 232</p> <p>Handling the Training and Test Data 233</p> <p>Image Preparation 233</p> <p>CNN Model Configuration 234</p> <p>Model Training 236</p> <p>Model Evaluation 236</p> <p>Saving the Model 237</p> <p>Transfer Learning 237</p> <p>Summary 238</p> <p><b>Chapter 12 Machine Learning Streaming with Kafka 239</b></p> <p>What You Will Learn in This Chapter 239</p> <p>From Machine Learning to Machine Learning Engineer 240</p> <p>From Batch Processing to Streaming Data Processing 241</p> <p>What is Kafka? 241</p> <p>How Does It Work? 241</p> <p>Fault Tolerance 243</p> <p>Further Reading 243</p> <p>Installing Kafka 243</p> <p>Kafka as a Single-Node Cluster 244</p> <p>Kafka as a Multinode Cluster 245</p> <p>Topics Management 247</p> <p>Creating Topics 248</p> <p>Finding Out Information About Existing Topics 248</p> <p>Deleting Topics 249</p> <p>Sending Messages from the Command Line 249</p> <p>Receiving Messages from the Command Line 250</p> <p>Kafka Tool UI 250</p> <p>Writing Your Own Producers and Consumers 251</p> <p>Producers in Java 251</p> <p>Consumers in Java 255</p> <p>Building and Running the Applications 258</p> <p>The Streaming API 260</p> <p>Building a Streaming Machine Learning System 262</p> <p>Planning the System 263</p> <p>Continuous Training 265</p> <p>Determining Which Models to Use for Predictions 266</p> <p>Determining Which Algorithms to Use 268</p> <p>Simple Linear Regression 271</p> <p>Neural Network 274</p> <p>Kafka Topics 281</p> <p>Creating the Topics 281</p> <p>Kafka Connect 283</p> <p>Why Persist the Event Data? 283</p> <p>The REST API Microservice 285</p> <p>Processing Commands and Events 287</p> <p>Finding Kafka Brokers 288</p> <p>A Command or an Event? 289</p> <p>Making Predictions 293</p> <p>Prediction Streaming API 293</p> <p>Prediction Functions 296</p> <p>Predicting Linear Regression 298</p> <p>Predicting the Neural Network Model 299</p> <p>Running the Project 301</p> <p>Run MySQL 301</p> <p>Run Zookeeper 301</p> <p>Run Kafka 301</p> <p>Create the Topics 301</p> <p>Run Kafka Connect 301</p> <p>Model Builds 302</p> <p>Run Events Streaming Application 302</p> <p>Run Prediction Streaming Application 302</p> <p>Start the API 302</p> <p>Send JSON Training Data 302</p> <p>Train a Model 302</p> <p>Make a Prediction 303</p> <p>Summary 303</p> <p><b>Chapter 13 Apache Spark 305</b></p> <p>Spark: A Hadoop Replacement? 305</p> <p>Java, Scala, or Python? 306</p> <p>Downloading and Installing Spark 306</p> <p>A Quick Intro to Spark 306</p> <p>Starting the Shell 307</p> <p>Data Sources 307</p> <p>Testing Spark 308</p> <p>Spark Monitor 309</p> <p>Comparing Hadoop MapReduce to Spark 310</p> <p>Writing Stand-Alone Programs with Spark 313</p> <p>Spark Programs in Java 313</p> <p>Spark Program Summary 318</p> <p>Spark SQL 318</p> <p>Basic Concepts 318</p> <p>Wrapping Up SparkSQL 323</p> <p>Spark Streaming 323</p> <p>Basic Concepts 323</p> <p>Creating Your First Spark Stream 324</p> <p>Spark Streams from Kafka 326</p> <p>MLib: The Machine Learning Library 327</p> <p>Dependencies 328</p> <p>Decision Trees 328</p> <p>Clustering 330</p> <p>Association Rules with FP-Growth 332</p> <p>Summary 335</p> <p><b>Chapter 14 Machine Learning with R 337</b></p> <p>Installing R 337</p> <p>macOS 337</p> <p>Windows 338</p> <p>Linux 338</p> <p>Your First Run 338</p> <p>Installing R-Studio 339</p> <p>The R Basics 340</p> <p>Variables and Vectors 340</p> <p>Matrices 341</p> <p>Lists 342</p> <p>Data Frames 343</p> <p>Installing Packages 344</p> <p>Loading in Data 345</p> <p>Plotting Data 347</p> <p>Simple Statistics 350</p> <p>Simple Linear Regression 350</p> <p>Creating the Data 351</p> <p>The Initial Graph 351</p> <p>Regression with the Linear Model 351</p> <p>Making a Prediction 352</p> <p>Basic Sentiment Analysis 353</p> <p>Using Functions to Load in Word Lists 353</p> <p>Writing a Function to Score Sentiment 354</p> <p>Testing the Function 354</p> <p>Apriori Association Rules 355</p> <p>Installing the arules Package 355</p> <p>Gathering the Training Data 356</p> <p>Importing the Transaction Data 356</p> <p>Running the Apriori Algorithm 357</p> <p>Inspecting the Results 358</p> <p>Accessing R from Java 358</p> <p>Installing the rJava Package 358</p> <p>Creating Your First Java Code in R 359</p> <p>Calling R from Java Programs 359</p> <p>Setting Up an Eclipse Project 360</p> <p>Creating the Java/R Class 361</p> <p>Running the Example 361</p> <p>Extending Your R Implementations 363</p> <p>Connecting to Social Media with R 364</p> <p>Summary 366</p> <p><b>Appendix A Kafka Quick Start 367</b></p> <p>Installing Kafka 367</p> <p>Starting Zookeeper 367</p> <p>Starting Kafka 368</p> <p>Creating Topics 368</p> <p>Listing Topics 369</p> <p>Describing a Topic 369</p> <p>Deleting Topics 369</p> <p>Running a Console Producer 370</p> <p>Running a Console Consumer 370</p> <p><b>Appendix B The Twitter API Developer Application Configuration 371</b></p> <p><b>Appendix C Useful Unix Commands 375</b></p> <p>Using Sample Data 375</p> <p>Showing the Contents: cat, more, and less 376</p> <p>Example Command 376</p> <p>Expected Output 376</p> <p>Filtering Content: grep 377</p> <p>Example Command for Finding Text 377</p> <p>Example Output 377</p> <p>Sorting Data: sort 378</p> <p>Example Command for Basic Sorting 378</p> <p>Example Output 378</p> <p>Finding Unique Occurrences: uniq 380</p> <p>Showing the Top of a File: head 381</p> <p>Counting Words: wc 381</p> <p>Locating Anything: find 382</p> <p>Combining Commands and Redirecting Output 383</p> <p>Picking a Text Editor 383</p> <p>Colon Frenzy: Vi and Vim 383</p> <p>Nano 384</p> <p>Emacs 384</p> <p><b>Appendix D Further Reading 385</b></p> <p>Machine Learning 385</p> <p>Statistics 386</p> <p>Big Data and Data Science 386</p> <p>Visualization 387</p> <p>Making Decisions 387</p> <p>Datasets 388</p> <p>Blogs 388</p> <p>Useful Websites 389</p> <p>The Tools of the Trade 389</p> <p>Index 391</p>
<p><b>JASON BELL</b> has worked in software development for over thirty years, now he focuses on large volume data solutions and helping retail and finance customers gain insight from that data with machine learning. He is also an active committee member for several international technology conferences.
<p><b>Learn more from your data with this hands-on guide to machine learning</b> <p>If you want to get into machine learning but fear the math, this book is your ultimate guide. Specifically designed for non-mathematicians, this useful guide presents a breakdown of each variant of machine learning, with examples and working code. You'll learn the various algorithms, data preparation techniques, trees, and networks, and get acquainted with the tools that help you get more from your data. You'll understand how it works, where it's used, and how to make it great. <ul> <li>Learn the languages of machine learning: Weka, DeepLearning4J, Spark<sup>™</sup>, and R</li> <li>Make the right data storage and cleaning decisions, tailored to your desired output</li> <li>Understand decision trees, K-means clustering, artificial neural networks, and association rule learning</li> <li>Implement support vector machines knowing the relevant advantages and limitations</li> <li>Incorporate Big Data processing techniques with Spark and MLLib</li> <li>Use Apache Kafka to capture streaming data and learn in real time</li> <li>Access the tools you need to plan your project and acquire and process data</li> <li>Study examples and use provided working code for hands-on learning</li> </ul>

Diese Produkte könnten Sie auch interessieren:

Statistics for Microarrays
Statistics for Microarrays
von: Ernst Wit, John McClure
PDF ebook
90,99 €