Jehoshaphat I. Abu


100 Days Of ML Code — Day 006

100 Days Of ML Code — Day 006

Jehoshaphat I. Abu's photo
Jehoshaphat I. Abu
·Jul 16, 2018·

2 min read

100 Days Of ML Code — Day 006

Recap from Day 005

Day 005, we look in depth into classification. We learned that Classification models classify input data into categories. In other words; classification is the problem of assigning a label or a category to any incoming input.

Today, we’ll learn how supervised learning algorithms build classifiers from training examples by using classification algorithms.

Binary vs. Multiclass Classification

“When you are working on a classification problem, begin by determining whether the problem is binary or multiclass. In a binary classification problem, a single training or test item (instance) can only be divided into two classes” — for example, if you want to determine whether a key on the piano is pressed or not.

Binary Classification ProblemBinary Classification Problem

In a multiclass classification problem, it can be divided into more than two — for example, if you want to train a model to classify a piece of music as Jazz, Rock, Classical, Afro, or other genres.

Multiclass Classification ProblemMulticlass Classification Problem

“Bear in mind that a multiclass classification problem is generally more challenging because it requires a more complex model.”

Common Classification Algorithms

K Nearest Neighbor (KNN)

kNN categorizes objects based on the classes of their nearest neighbors in the dataset. kNN predictions assume that objects near each other are similar.

K Nearest Neighbor (KNN)K Nearest Neighbor (KNN)

KNN looks through the entire training example and find the one point in the training set that is closest to the current input. It then output a value identical to the output of the nearest neighbor.

Best Used…

· When you need a simple algorithm to establish benchmark learning rules

· When memory usage of the trained model is a lesser concern

· When prediction speed of the trained model is a lesser concern

Logistic Regression

Fits a model that can predict the probability of a binary response belonging to one class or the other.

Source: MathWorks-90221_80827v00_machine_learning_section4_ebook_v03.pdf Logistics Regression goesSource: MathWorks-90221_80827v00_machine_learning_section4_ebook_v03.pdf Logistics Regression goes

Because of its simplicity, logistic regression is commonly used as a starting point for binary classification problems.

Best Used…

· When data can be clearly separated by a single, linear boundary

· As a baseline for evaluating more complex classification methods

You made it to the end of day 006. Tomorrow, we’ll continue with more commonly used classification algorithms. Thank you for taking time out of your schedule and allowing me to be your guide on this journey

Refrence: Mathworks- 90221_80827v00_machine_learning_section4_ebook_v03.pdf

Share this