introduction_to_machine_learning_with_python.pdf

(30806 KB) Pobierz
Introduction to
Machine
Learning
with Python
A GUIDE FOR DATA SCIENTISTS
powered by
Andreas C. Müller & Sarah Guido
Introduction to Machine Learning
with Python
A Guide for Data Scientists
Andreas C. Müller and Sarah Guido
Beijing
Boston Farnham Sebastopol
Tokyo
Introduction to Machine Learning with Python
by Andreas C. Müller and Sarah Guido
Copyright © 2017 Sarah Guido, Andreas Müller. 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.
Editor:
Dawn Schanafelt
Production Editor:
Kristen Brown
Copyeditor:
Rachel Head
Proofreader:
Jasmine Kwityn
October 2016:
First Edition
Indexer:
Judy McConville
Interior Designer:
David Futato
Cover Designer:
Karen Montgomery
Illustrator:
Rebecca Demarest
Revision History for the First Edition
2016-09-22:
2017-01-13:
2017-06-09:
First Release
Second Release
Third Release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449369415
for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
Introduction to Machine Learning with
Python,
the cover image, and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the authors 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-449-36941-5
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1.
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Why Machine Learning?
Problems Machine Learning Can Solve
Knowing Your Task and Knowing Your Data
Why Python?
scikit-learn
Installing scikit-learn
Essential Libraries and Tools
Jupyter Notebook
NumPy
SciPy
matplotlib
pandas
mglearn
Python 2 Versus Python 3
Versions Used in this Book
A First Application: Classifying Iris Species
Meet the Data
Measuring Success: Training and Testing Data
First Things First: Look at Your Data
Building Your First Model: k-Nearest Neighbors
Making Predictions
Evaluating the Model
Summary and Outlook
1
2
4
5
5
6
7
7
7
8
9
10
11
12
12
13
15
17
19
21
22
23
23
iii
Zgłoś jeśli naruszono regulamin