<div><div style="font-family: 'MS Shell Dlg 2', sans-serif; font-size: 12px;"><br></div><div><div><font face="MS Shell Dlg 2, sans-serif"><span style="font-size: 12px;">Learn how to apply test-driven development (TDD) to machine-learning algorithmsand catch mistakes that could sink your analysis. In
Thoughtful Machine Learning: A Test-Driven Approach
โ Scribed by Kirk, Matthew
- Publisher
- O'Reilly Media
- Year
- 2014;2015
- Tongue
- English
- Leaves
- 235
- Edition
- First edition, October 2014
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
Learn how to apply test-driven development (TDD) to machine-learning algorithms--and catch mistakes that could sink your analysis. In this practical guide, author Matthew Kirk takes you through the principles of TDD and machine learning, and shows you how to apply TDD to several machine-learning algorithms, including Naive Bayesian classifiers and Neural Networks.
Machine-learning algorithms often have tests baked in, but they can't account for human errors in coding. Rather than blindly rely on machine-learning results as many researchers have, you can mitigate the risk of errors with TDD and write clean, stable machine-learning code. If you're familiar with Ruby 2.1, you're ready to start.
Apply TDD to write and run tests before you start coding
Learn the best uses and tradeoffs of eight machine learning algorithms
Use real-world examples to test each algorithm through engaging, hands-on exercises
Understand the similarities between TDD and the scientific method for validating solutions
Be aware of the risks of machine learning, such as underfitting and overfitting data
Explore techniques for improving your machine-learning models or data extraction
โฆ Table of Contents
Table of Contents......Page 5
What to Expect from This Book......Page 11
How to Contact Me......Page 12
Conventions Used in This Book......Page 13
Safariยฎ Books Online......Page 14
Acknowledgments......Page 15
Chapter 1. Test-Driven Machine Learning......Page 17
TDD and the Scientific Method......Page 18
TDD Makes a Logical Proposition of Validity......Page 19
TDD and Scientific Method Work in Feedback Loops......Page 21
Underfitting......Page 22
Overfitting......Page 24
Mitigate Unstable Data with Seam Testing......Page 25
Check Fit by Cross-Validating......Page 26
Reduce Overfitting Risk by Testing the Speed of Training......Page 28
Conclusion......Page 29
What Is Machine Learning?......Page 31
Unsupervised Learning......Page 32
What Can Machine Learning Accomplish?......Page 33
Mathematical Notation Used Throughout the Book......Page 34
Conclusion......Page 35
Chapter 3. K-Nearest Neighbors Classification......Page 37
House Happiness Based on a Neighborhood......Page 38
Guessing K......Page 41
Heuristics for Picking K......Page 42
What Makes a Neighbor โNearโ?......Page 45
Minkowski Distance......Page 46
Mahalanobis Distance......Page 47
Determining Classes......Page 48
Beard and Glasses Detection Using KNN and OpenCV......Page 50
The Class Diagram......Page 51
Raw Image to Avatar......Page 52
The Face Class......Page 55
The Neighborhood Class......Page 58
Conclusion......Page 66
Using Bayesโs Theorem to Find Fraudulent Orders......Page 67
Conditional Probabilities......Page 68
Naive Bayesian Classifier......Page 70
Naivety in Bayesian Reasoning......Page 71
Pseudocount......Page 72
Spam Filter......Page 73
The Class Diagram......Page 74
Email Class......Page 75
Tokenization and Context......Page 77
The SpamTrainer......Page 79
Error Minimization Through Cross-Validation......Page 86
Conclusion......Page 89
Tracking User Behavior Using State Machines......Page 91
Emissions/Observations of Underlying States......Page 93
Using Markov Chains Instead of a Finite State Machine......Page 95
Evaluation: Forward-Backward Algorithm......Page 96
Using User Behavior......Page 97
The Decoding Problem through the Viterbi Algorithm......Page 100
Part-of-Speech Tagging with the Brown Corpus......Page 101
The Seam of Our Part-of-Speech Tagger: CorpusParser......Page 102
Writing the Part-of-Speech Tagger......Page 104
Cross-Validating to Get Confidence in the Model......Page 112
Conclusion......Page 113
Solving the Loyalty Mapping Problem......Page 115
Derivation of SVM......Page 117
The Kernel Trick......Page 118
Soft Margins......Page 122
The Class Diagram......Page 124
Corpus Class......Page 125
Return a Unique Set of Words from the Corpus......Page 129
The CorpusSet Class......Page 130
The SentimentClassifier Class......Page 134
Conclusion......Page 139
History of Neural Networks......Page 141
What Is an Artificial Neural Network?......Page 142
Input Layer......Page 143
Hidden Layers......Page 144
Neurons......Page 145
Training Algorithms......Page 151
How Many Hidden Layers?......Page 155
Tolerance for Error and Max Epochs......Page 156
Using a Neural Network to Classify a Language......Page 157
Writing the Seam Test for Language......Page 159
Cross-Validating Our Way to a Network Class......Page 162
Wrap-Up of Example......Page 166
Conclusion......Page 167
Chapter 8. Clustering......Page 169
User Cohorts......Page 170
The K-Means Algorithm......Page 172
Expectation Maximization (EM) Clustering......Page 173
Categorizing Music......Page 175
Gathering the Data......Page 176
Analyzing the Data with K-Means......Page 177
EM Clustering......Page 179
EM Jazz Clustering Results......Page 183
Conclusion......Page 184
Collaborative Filtering......Page 185
Linear Regression Applied to Collaborative Filtering......Page 187
Introducing Regularization, or Ridge Regression......Page 189
Wrap-Up of Theory......Page 191
The Tools We Will Need......Page 192
Reviewer......Page 195
Writing the Code to Figure Out Someoneโs Preference......Page 197
Conclusion......Page 200
The Problem with the Curse of Dimensionality......Page 203
Feature Selection......Page 204
Feature Transformation......Page 207
Principal Component Analysis (PCA)......Page 210
Independent Component Analysis (ICA)......Page 211
Monitoring Machine Learning Algorithms......Page 213
Precision and Recall: Spam Filter......Page 214
Mean Squared Error......Page 216
The Wilds of Production Environments......Page 218
Conclusion......Page 219
Machine Learning Algorithms Revisited......Page 221
Whatโs Next for You?......Page 223
Index......Page 225
About the Author......Page 234
โฆ Subjects
Science;Technology;Computer Science;Programming
๐ SIMILAR VOLUMES
Learn how to apply test-driven development (TDD) to machine-learning algorithms--and catch mistakes that could sink your analysis. In this practical guide, author Matthew Kirk takes you through the principles of TDD and machine learning, and shows you how to apply TDD to several machine-learning alg
Learn how to apply test-driven development (TDD) to machine-learning algorithms--and catch mistakes that could sink your analysis. In this practical guide, author Matthew Kirk takes you through the principles of TDD and machine learning, and shows you how to apply TDD to several machine-learning alg
Learn how to apply test-driven development (TDD) to machine-learning algorithms--and catch mistakes that could sink your analysis. In this practical guide, author Matthew Kirk takes you through the principles of TDD and machine learning, and shows you how to apply TDD to several machine-learning alg
<div><p>Learn how to apply test-driven development (TDD) to machine-learning algorithmsโand catch mistakes that could sink your analysis. In this practical guide, author Matthew Kirk takes you through the principles of TDD and machine learning, and shows you how to apply TDD to several machine-learn
Learn how to apply test-driven development (TDD) to machine-learning algorithmsโand catch mistakes that could sink your analysis. In this practical guide, author Matthew Kirk takes you through the principles of TDD and machine learning, and shows you how to apply TDD to several machine-learning algo