thoughtful_machine_learning_with_python.pdf

(7545 KB) Pobierz
Thoughtful Machine
Learning with
Python
A TEST-DRIVEN APPROACH
Matthew Kirk
Thoughtful Machine Learning
with Python
A Test-Driven Approach
Matthew Kirk
Beijing
Boston Farnham Sebastopol
Tokyo
Thoughtful Machine Learning with Python
by Matthew Kirk
Copyright © 2017 Matthew Kirk. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://oreilly.com/safari). For more information, contact our corporate/insti‐
tutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editors:
Mike Loukides and Shannon Cutt
Production Editor:
Nicholas Adams
Copyeditor:
James Fraleigh
Proofreader:
Charles Roumeliotis
January 2017:
First Edition
Indexer:
Wendy Catalano
Interior Designer:
David Futato
Cover Designer:
Randy Comer
Illustrator:
Rebecca Demarest
Revision History for the First Edition
2017-01-10:
2017-10-20:
First Release
Second Release
See
http://oreilly.com/catalog/errata.csp?isbn=9781491924136
for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
Thoughtful Machine Learning with
Python,
the cover image, and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the author have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the author disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
978-1-491-92413-6
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1.
Probably Approximately Correct Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Writing Software Right
SOLID
Testing or TDD
Refactoring
Writing the Right Software
Writing the Right Software with Machine Learning
What Exactly Is Machine Learning?
The High Interest Credit Card Debt of Machine Learning
SOLID Applied to Machine Learning
Machine Learning Code Is Complex but Not Impossible
TDD: Scientific Method 2.0
Refactoring Our Way to Knowledge
The Plan for the Book
What Is Machine Learning?
Supervised Learning
Unsupervised Learning
Reinforcement Learning
What Can Machine Learning Accomplish?
Mathematical Notation Used Throughout the Book
Conclusion
2
2
4
5
6
7
7
8
9
12
12
13
13
15
15
16
17
17
18
19
21
22
22
iii
2.
A Quick Introduction to Machine Learning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.
K-Nearest Neighbors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
How Do You Determine Whether You Want to Buy a House?
How Valuable Is That House?
Hedonic Regression
Zgłoś jeśli naruszono regulamin