Imagine you're teaching a child to recognize different types of animals. You show them a picture of a cat and say, "That's a cat." You show them a dog and say, "That's a dog." After many examples, the child can look at a new picture they've never seen before and correctly identify whether it's a cat or a dog.
This is the key concept to what machine learning is...
What is supervised learning?
Supervised learning is a pattern in ML where a model learns from labeled data and in return it predict the labels for new data. The main task under supervised learning is classification which is used to predict categorical labels e.g. "Spam" or "Not spam" in emails.
How classification works
We begin with definition;
Classification is a type of supervised learning and the main goal here is to predict categories or classes. The model is trained using labeled data plus the best and correct category then the model learns unique features during training to unseen data.
The different models used for classification
A wide variety of algorithms are common when dealing with classification and they are;
*Logistic regression- it uses sigmoid function to convert a linear output to a probability. It is also simple and interpretable and works well with binary classifications.
*KNN(K-Nearest Neighbors)- it mainly classifies a data point based on the majority class of it's "Neighbors". It's also simple but mostly depends with the value of 'K'.
*Decision Trees- the model here makes the decision by splitting data into several branches which sometimes makes it easy to interpret.
*Random Forest- they are from an ensemble method of learning that deals with multiple ML models to improve the performance and in turn it will also reduce overfitting.
Personal Views and Insights
My view on supervised learning in relation to classification is that a clean and well-featured dataset will yield better results but also sometimes simple models like logistic regression can outdo the complex ones example of those ensemble techniques.
Challenges you’ve faced while working with classification
As a beginner, working with classification has been full of trial and errors but the most challenging ones have been;
*Overfitting and underfitting- for example when dealing with KNN, a high pick of "K" might make you overlook some pattern hence missing on some important patterns that are maybe key to your model.
*Choosing the right algorithm to use.
*Hardship in interpretation and explaining classifications.
To conclude, supervised classification and learning proves the partnership between humans and computers by how we teach computers to learn from data.
Top comments (0)