/Machine-Learning-in-Action

python codes of Machine Learning in Action

Primary LanguagePython

Machine-Learning-in-Action

python codes with numpy -- Machine Learning in Action

codes updated

chapter 2: kNN

2.1 The k-Nearest Neighbors classification algorithm

2.2 using kNN on results from a dating site

2.3 using kNN on a handwriting recognition system

chapter 3: Decision Tree

3.1 Tree construction

3.2 Plotting trees in Python with Matplotlib annotations

3.3 Testing and storing the classifier

3.4 Example: using decision trees to predict contact lens type

chapter 4: Naive Bayes

4.1 Classifying with Bayesian decision theory

4.2 Conditional probability

4.3 Classifying with conditional probabilities

4.4 Document classification with naïve Bayes

4.5 Classifying text with Python

4.6 Example: classifying spam email with naïve Bayes

Chapter 5: Logistic regression

5.1 Classification with logistic regression and the sigmoid function: a tractable step function

5.2 Using optimization to find the best regression coefficients

5.3 Example: estimating horse fatalities from colic

Chapter 6: Support vector machines

6.1 Separating data with the maximum margin

6.2 Finding the maximum margin

6.3 Efficient optimization with the SMO algorithm

Chapter 7 Improving classification with the AdaBoost meta-algorithm

7.1 Classifiers using multiple samples of the dataset

7.2 Train: improving the classifier by focusing on errors

7.3 Creating a weak learner with a decision stump

7.4 Implementing the full AdaBoost algorithm

7.5 Test: classifying with AdaBoost

7.6 Example: AdaBoost on a difficult dataset

7.7 Classification imbalance