Skip to content

Commit

Permalink
Update readmes (rasbt#41)
Browse files Browse the repository at this point in the history
* update readmes

* update readmes

* update readmes
  • Loading branch information
rasbt authored Sep 13, 2017
1 parent 9e589c4 commit 074636b
Show file tree
Hide file tree
Showing 21 changed files with 776 additions and 57 deletions.
50 changes: 0 additions & 50 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

38 changes: 32 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
## Python Machine Learning (2nd Ed.) Code Repository

[![Build Status](https://travis-ci.com/rasbt/python-machine-learning-book-2nd-edition.svg?token=zvSsJVLJFKzB2yqaeKN1&branch=master)](https://travis-ci.com/rasbt/python-machine-learning-book-2nd-edition)
![Python 3.6](https://img.shields.io/badge/Python-3.6-blue.svg)
![License](https://img.shields.io/badge/Code%20License-MIT-blue.svg)

## Note: this repo is still under construction ...


[<img src="./images/cover_1.jpg" width="348">](https://www.amazon.com/Python-Machine-Learning-scikit-learn-TensorFlow/dp/1787125939)

Python Machine Learning
2nd edition, to published October 2017
**Python Machine Learning, 2nd Ed.**
to be published mid-September 2017

Paperback: 501? pages
Paperback: 601? pages
Publisher: Packt Publishing
Language: English

ISBN-10: 1787125939
ISBN-13: 978-1787125933
Kindle ASIN: B0742K7HYF

#### Links
[<img src="./images/cover_1.jpg" width="348">](https://www.amazon.com/Python-Machine-Learning-scikit-learn-TensorFlow/dp/1787125939)


## Links

- [Amazon Page](https://www.amazon.com/Python-Machine-Learning-scikit-learn-TensorFlow/dp/1787125939)
- [Packt Page](https://www.packtpub.com/big-data-and-business-intelligence/python-machine-learning-second-edition)



## Table of Contents and Code Notebooks

**Helpful installation and setup instructions can be found in the [README.md file of Chapter 1](code/ch01/README.md)**
Expand Down Expand Up @@ -63,3 +68,24 @@ In addition, the [code/](code/) subdirectories also contain .py script files, wh
Along with the new introduction to deep learning using TensorFlow, the biggest additions to this new edition are three brand new chapters focussing on deep learning applications: A more detailed overview of the TensorFlow mechanics, an introduction to convolutional neural networks for image classification, and an introduction to recurrent neural networks for natural language processing. Of course, and in a similar vein as the rest of the book, these new chapters do not only provide readers with practical instructions and examples but also introduce the fundamental mathematics behind those concepts, which are an essential building block for understanding how deep learning works.

[ [Excerpt from "Machine Learning can be useful in almost every problem domain:" An interview with Sebastian Raschka](https://www.packtpub.com/books/content/machine-learning-useful-every-problem-domain-interview-sebastian-raschka/) ]


---

<br>
<br>

Raschka, Sebastian, and Vahid Mirjalili. *Python Machine Learning, 2nd Ed*. Packt Publishing, 2017.

@book{RaschkaMirjalili2017,
address = {Birmingham, UK},
author = {Raschka, Sebastian and Mirjalili, Vahid},
edition = {2},
isbn = {978-1787125933},
keywords = {Clustering,Data Science,Deep Learning,
Machine Learning,Neural Networks,Programming,
Supervised Learning},
publisher = {Packt Publishing},
title = {{Python Machine Learning, 2nd Ed.}},
year = {2017}
}
2 changes: 1 addition & 1 deletion code/ch01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Sebastian Raschka, 2017
Python Machine Learning - Code Examples


## Chapter 1 - Giving Computers the Ability to Learn from Data
## Chapter 1: Giving Computers the Ability to Learn from Data


---
Expand Down
48 changes: 48 additions & 0 deletions code/ch02/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Python Machine Learning - Code Examples


## Chapter 2: Training Simple Machine Learning Algorithms for Classification

### Chapter Outline

- Artificial neurons – a brief glimpse into the early history of machine learning
- The formal definition of an artificial neuron
- The perceptron learning rule
- Implementing a perceptron learning algorithm in Python
- An object-oriented perceptron API
- Training a perceptron model on the Iris dataset
- Adaptive linear neurons and the convergence of learning
- Minimizing cost functions with gradient descent
- Implementing an Adaptive Linear Neuron in Python
- Improving gradient descent through feature scaling
- Large scale machine learning and stochastic gradient descent
- Summary

### A note on using the code examples

The recommended way to interact with the code examples in this book is via Jupyter Notebook (the `.ipynb` files). Using Jupyter Notebook, you will be able to execute the code step by step and have all the resulting outputs (including plots and images) all in one convenient document.

![](images/jupyter-example-1.png)



Setting up Jupyter Notebook is really easy: if you are using the Anaconda Python distribution, all you need to install jupyter notebook is to execute the following command in your terminal:

conda install jupyter notebook

Then you can launch jupyter notebook by executing

jupyter notebook

A window will open up in your browser, which you can then use to navigate to the target directory that contains the `.ipynb` file you wish to open.

**More installation and setup instructions can be found in the [README.md file of Chapter 1](../ch01/README.md)**.

**(Even if you decide not to install Jupyter Notebook, note that you can also view the notebook files on GitHub by simply clicking on them: [`ch02.ipynb`](ch02.ipynb))**

In addition to the code examples, I added a table of contents to each Jupyter notebook as well as section headers that are consistent with the content of the book. Also, I included the original images and figures in hope that these make it easier to navigate and work with the code interactively as you are reading the book.

![](images/jupyter-example-2.png)


When I was creating these notebooks, I was hoping to make your reading (and coding) experience as convenient as possible! However, if you don't wish to use Jupyter Notebooks, I also converted these notebooks to regular Python script files (`.py` files) that can be viewed and edited in any plaintext editor.
Binary file added code/ch02/images/jupyter-example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added code/ch02/images/jupyter-example-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions code/ch03/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Python Machine Learning - Code Examples


## Chapter 3: A Tour of Machine Learning Classifiers Using scikit-learn

### Chapter Outline

- Choosing a classi cation algorithm
- First steps with scikit-learn – training a perceptron
- Modeling class probabilities via logistic regression
- Logistic regression intuition and conditional probabilities
- Learning the weights of the logistic cost function
- Converting an Adaline implementation into an algorithm for logistic regression
- Training a logistic regression model with scikit-learn
- Tackling over tting via regularization
- Maximum margin classification with support vector machines
- Maximum margin intuition
- Dealing with a nonlinearly separable case using slack variables
- Alternative implementations in scikit-learn
- Solving nonlinear problems using a kernel SVM
- Kernel methods for linearly inseparable data
- Using the kernel trick to find separating hyperplanes in high-dimensional space
- Decision tree learning
- Maximizing information gain – getting the most bang for your buck
- Building a decision tree
- Combining multiple decision trees via random forests
- K-nearest neighbors – a lazy learning algorithm
- Summary

### A note on using the code examples

The recommended way to interact with the code examples in this book is via Jupyter Notebook (the `.ipynb` files). Using Jupyter Notebook, you will be able to execute the code step by step and have all the resulting outputs (including plots and images) all in one convenient document.

![](../ch02/images/jupyter-example-1.png)



Setting up Jupyter Notebook is really easy: if you are using the Anaconda Python distribution, all you need to install jupyter notebook is to execute the following command in your terminal:

conda install jupyter notebook

Then you can launch jupyter notebook by executing

jupyter notebook

A window will open up in your browser, which you can then use to navigate to the target directory that contains the `.ipynb` file you wish to open.

**More installation and setup instructions can be found in the [README.md file of Chapter 1](../ch01/README.md)**.

**(Even if you decide not to install Jupyter Notebook, note that you can also view the notebook files on GitHub by simply clicking on them: [`ch03.ipynb`](ch03.ipynb))**

In addition to the code examples, I added a table of contents to each Jupyter notebook as well as section headers that are consistent with the content of the book. Also, I included the original images and figures in hope that these make it easier to navigate and work with the code interactively as you are reading the book.

![](../ch02/images/jupyter-example-2.png)


When I was creating these notebooks, I was hoping to make your reading (and coding) experience as convenient as possible! However, if you don't wish to use Jupyter Notebooks, I also converted these notebooks to regular Python script files (`.py` files) that can be viewed and edited in any plaintext editor.
56 changes: 56 additions & 0 deletions code/ch04/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Python Machine Learning - Code Examples


## Chapter 4: Building Good Training Sets – Data Preprocessing

### Chapter Outline

- Dealing with missing data
- Identifying missing values in tabular data
- Eliminating samples or features with missing values
- Imputing missing values
- Understanding the scikit-learn estimator API
- Handling categorical data
- Nominal and ordinal features
- Creating an example dataset
- Mapping ordinal features
- Encoding class labels
- Performing one-hot encoding on nominal features
- Partitioning a dataset into separate training and test sets
- Bringing features onto the same scale
- Selecting meaningful features
- L1 and L2 regularization as penalties against model complexity
- A geometric interpretation of L2 regularization
- Sparse solutions with L1 regularization
- Sequential feature selection algorithms
- Assessing feature importance with random forests
- Summary

### A note on using the code examples

The recommended way to interact with the code examples in this book is via Jupyter Notebook (the `.ipynb` files). Using Jupyter Notebook, you will be able to execute the code step by step and have all the resulting outputs (including plots and images) all in one convenient document.

![](../ch02/images/jupyter-example-1.png)



Setting up Jupyter Notebook is really easy: if you are using the Anaconda Python distribution, all you need to install jupyter notebook is to execute the following command in your terminal:

conda install jupyter notebook

Then you can launch jupyter notebook by executing

jupyter notebook

A window will open up in your browser, which you can then use to navigate to the target directory that contains the `.ipynb` file you wish to open.

**More installation and setup instructions can be found in the [README.md file of Chapter 1](../ch01/README.md)**.

**(Even if you decide not to install Jupyter Notebook, note that you can also view the notebook files on GitHub by simply clicking on them: [`ch04.ipynb`](ch04.ipynb))**

In addition to the code examples, I added a table of contents to each Jupyter notebook as well as section headers that are consistent with the content of the book. Also, I included the original images and figures in hope that these make it easier to navigate and work with the code interactively as you are reading the book.

![](../ch02/images/jupyter-example-2.png)


When I was creating these notebooks, I was hoping to make your reading (and coding) experience as convenient as possible! However, if you don't wish to use Jupyter Notebooks, I also converted these notebooks to regular Python script files (`.py` files) that can be viewed and edited in any plaintext editor.
57 changes: 57 additions & 0 deletions code/ch05/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Python Machine Learning - Code Examples


## Chapter 5: Compressing Data via Dimensionality Reduction

### Chapter Outline

- Unsupervised dimensionality reduction via principal component analysis
- The main steps behind principal component analysis
- Extracting the principal components step by step
- Total and explained variance
- Feature transformation
- Principal component analysis in scikit-learn
- Supervised data compression via linear discriminant analysis
- Principal component analysis versus linear discriminant analysis
- The inner workings of linear discriminant analysis
- Computing the scatter matrices
- Selecting linear discriminants for the new feature subspace
- Projecting samples onto the new feature space
- LDA via scikit-learn
- Using kernel principal component analysis for nonlinear mappings
- Kernel functions and the kernel trick
- Implementing a kernel principal component analysis in Python
- Example 1 – separating half-moon shapes
- Example 2 – separating concentric circles
- Projecting new data points
- Kernel principal component analysis in scikit-learn
- Summary

### A note on using the code examples

The recommended way to interact with the code examples in this book is via Jupyter Notebook (the `.ipynb` files). Using Jupyter Notebook, you will be able to execute the code step by step and have all the resulting outputs (including plots and images) all in one convenient document.

![](../ch02/images/jupyter-example-1.png)



Setting up Jupyter Notebook is really easy: if you are using the Anaconda Python distribution, all you need to install jupyter notebook is to execute the following command in your terminal:

conda install jupyter notebook

Then you can launch jupyter notebook by executing

jupyter notebook

A window will open up in your browser, which you can then use to navigate to the target directory that contains the `.ipynb` file you wish to open.

**More installation and setup instructions can be found in the [README.md file of Chapter 1](../ch01/README.md)**.

**(Even if you decide not to install Jupyter Notebook, note that you can also view the notebook files on GitHub by simply clicking on them: [`ch05.ipynb`](ch05.ipynb))**

In addition to the code examples, I added a table of contents to each Jupyter notebook as well as section headers that are consistent with the content of the book. Also, I included the original images and figures in hope that these make it easier to navigate and work with the code interactively as you are reading the book.

![](../ch02/images/jupyter-example-2.png)


When I was creating these notebooks, I was hoping to make your reading (and coding) experience as convenient as possible! However, if you don't wish to use Jupyter Notebooks, I also converted these notebooks to regular Python script files (`.py` files) that can be viewed and edited in any plaintext editor.
Loading

0 comments on commit 074636b

Please sign in to comment.