|
| 1 | +Python Machine Learning - Code Examples |
| 2 | + |
| 3 | + |
| 4 | +## Chapter 3: A Tour of Machine Learning Classifiers Using scikit-learn |
| 5 | + |
| 6 | +### Chapter Outline |
| 7 | + |
| 8 | +- Choosing a classification algorithm |
| 9 | +- First steps with scikit-learn -- training a perceptron |
| 10 | +- Modeling class probabilities via logistic regression |
| 11 | + - Logistic regression intuition and conditional probabilities |
| 12 | + - Learning the weights of the logistic cost function |
| 13 | + - Converting an Adaline implementation into an algorithm for logistic regression |
| 14 | + - Training a logistic regression model with scikit-learn |
| 15 | + - Tackling over tting via regularization |
| 16 | +- Maximum margin classification with support vector machines |
| 17 | + - Maximum margin intuition |
| 18 | + - Dealing with a nonlinearly separable case using slack variables |
| 19 | + - Alternative implementations in scikit-learn |
| 20 | +- Solving nonlinear problems using a kernel SVM |
| 21 | + - Kernel methods for linearly inseparable data |
| 22 | + - Using the kernel trick to find separating hyperplanes in high-dimensional space |
| 23 | +- Decision tree learning |
| 24 | + - Maximizing information gain – getting the most bang for your buck |
| 25 | + - Building a decision tree |
| 26 | + - Combining multiple decision trees via random forests |
| 27 | +- K-nearest neighbors – a lazy learning algorithm |
| 28 | +- Summary |
| 29 | + |
| 30 | +### A note on using the code examples |
| 31 | + |
| 32 | +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. |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | +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: |
| 39 | + |
| 40 | + conda install jupyter notebook |
| 41 | + |
| 42 | +Then you can launch jupyter notebook by executing |
| 43 | + |
| 44 | + jupyter notebook |
| 45 | + |
| 46 | +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. |
| 47 | + |
| 48 | +**More installation and setup instructions can be found in the [README.md file of Chapter 1](../ch01/README.md)**. |
| 49 | + |
| 50 | +**(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))** |
| 51 | + |
| 52 | +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. |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +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. |
0 commit comments