模型评价与分类算法
在这模块,你将会学习到分类技术。 你将练习不同的分类算法,如KNN、决策树、Logistic回归和SVM。此外,你还将了解每种方法的优缺点以及不同分类的分类精度指标。
In Module 2, you will learn about classification techniques. You practice with different classification algorithms, such as KNN, Decision Trees, Logistic Regression, and SVM. Also, you learn about the pros and cons of each method and different classification accuracy metrics.
KEY CONCEPTS
· To understand different Classification methods.
· To apply Classification algorithms on various datasets to solve real-world problems.
· To understand evaluation methods in Classification.
A Tour of Machine Learning Classifiers Using sci-kit-learn
Chapter Outline
Choosing a classification 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 overtting 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
A note on using the code examples
The recommended way to interact with the code examples in this course 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.
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.
You can also consider the IBM Developer Skills Network Labs: