DEV Community

Victoria Irungu
Victoria Irungu

Posted on

Supervised Learning: Classification.

What is Supervised Learning?
Remember in high school when you had a group of your classmates who usually scored almost the same marks as yours. And when their results were out first you would automatically predict your results. That is a form of supervised learning.

Supervised learning is a type of machine learning where the model is trained using labelled data. The model learns from the examples that are fed into it, then gives the output based on the given inputs.

There are two types of Supervised Learning:
a) Classification
b) Regression

In this article, I will focus on Classification.
Classification is a type of supervised machine learning where the model learns from labeled data then assigns the inputs into their various categories.

An example of classification is showing a child the images of a cow and that of a chicken. You show them different images of cows, with different colors, size and do the same for the chicken. When the child later sees a new cow or chicken, they can still recognize and classify it correctly.

Models used in classification include:
a) Logistic Regression - used for binary outcomes like spam vs. not spam.
b) K-Nearest Neighbors - classifies the data based on the majority of the nearest neighbors.
c) Decision Trees - splits the data into branches like in a flow chart.

However, these models of classification are not completely accurate. Sometimes the model may learn even the irrelevant stuff or even be inaccurate. Therefore having a model with clean data and careful evaluation increases its accuracy.

Top comments (0)