A fully comprehensive, clear & concise explanation to help you uncover the real truth about the enigmatic cost function.

Photo by Gaelle Marcel on Unsplash

NOTE: This article assumes that you are familiar with how an SVM operates. If this is not the case for you, be sure to check my out previous article which breaks down the SVM algorithm from first principles, and also includes a coded implementation of the algorithm from scratch!

I have seen lots of articles and blog posts on the Hinge Loss and how it works. However, I find most of them to be quite vague and not giving a clear explanation of what exactly the function does and what it is. …

Learn, understand and implement one of the most powerful versatile Machine Learning Algorithms from first principles.

Photo by Mike Lorusso on Unsplash

Support Vector Machines are very versatile Machine Learning algorithms. The main reason for their popularity is for their ability to perform both linear and non-linear classification and regression using what is known as the kernel trick; if you don’t know what that is, don’t worry. By the end of this article, you will be able to :

  • Understand what an SVM is and how it works
  • Distinguish between a hard margin SVM vs a Soft margin SVM
  • Code an SVM from Scratch in Python

So, without further ado, let’s dive in!

What is an SVM and why do I need it?

Learn about different & resources that will make your next portfolio project stand out from the crowd.

Photo by Kelly Sikkema on Unsplash


Portfolio projects are key for any Data Science. Not only do they showcase your work, abilities and strengths to recruiters, but they are also a great way to apply your learning.

Unfortunately, many people don’t really craft their portfolio projects to the best it can be. Instead, they write some code, put it up on Github, and possibly write an article about it, or, they do a Kaggle competition and drop the code on Github.

This unfortunately is not a great way of creating portfolio projects. Why? because the model you have created is just living in a notebook, thus…

Implement, understand and learn about how 3 powerful methods, including Deep Learning, can be used to impute data.

Photo by Pixabay on Pexels

I’m sure that every Data Scientist/ ML Practitioner has faced the challenge of missing values in their dataset. It is a common data cleaning process, but frankly, a very overlooked and neglected one. However, an effective missing value strategy can have a significant impact on your model’s performance.

Reasons for the occurrence of missing values

The reason as to why missing values occur is often specific to the problem domain. However, most of the time they occur from the following scenarios:

  • Code Bug: The data collection method encountered a bug and some value were not properly obtained(for example, if you were to collect data via a REST…

Get an in-depth understanding about outlier detection and how you can implement 3 simple, intuitive and powerful outlier detection algorithms in Python

Photo By Scott.T on Flickr

I’m sure you have come across a few of the following scenarios:

  1. Your model is not performing as you wanted it to.
  2. You can’t help but notice that some points seem to differ greatly from the rest.

Well congratulations, because you might have outliers in your data!

What are Outliers?

Explore the real truth behind the fundamental classification model, and build a classifier from Scratch using Python.

Photo by Drew Beamer on Unsplash

Logistic Regression is essentially a must-know for any upcoming Data Scientist or Machine Learning Practitioner. It is most likely the first classification model one has encountered. But, the question is, how does it really work? What does it do? Why is it used for classification? In this article, I hope to answer all these questions, and by the time you finish reading this article, you will have:

  1. Learn how to explain the Logistic Regression model in simple language
  2. Learn how Logistic Regression is mathematically formed
  3. Implement Logistic Regression from Scratch using Python

So, get ready for the wild adventure ahead…

Learn, Understand and implement the most important and fundamental algorithm in all of Data Science and Machine Learning.

Photo by Julian Ebert on Unsplash

Probably one of the most common algorithms around, Linear Regression is a must know for Machine Learning Practitioners. This is usually a beginner’s first exposure to a real Machine Learning algorithm, and knowing how it operates on a deeper level is crucial to gain a better understanding of it.

So, briefly, let’s break down the real question; What really is Linear Regression?

Linear Regression Definition

Linear Regression is a supervised learning algorithm that aims at taking a linear approach at modelling the relation between a dependent variable and an independent variable. …

Photo by Blake Wheeler on Unsplash

An essential algorithm in a Machine Learning Practitioner’s toolkit has to be K Nearest Neighbours(or KNN, for short). While it may be one of the most simple algorithms, it is also a very powerful one and is used in many real world applications. In this tutorial, I will be doing the following:

  • Explain the KNN algorithm and how it works
  • Implement it from scratch using Python

So, without further ado, let’s get this Machine Learning party started!

K Nearest Neighbours explained

This is a common machine learning algorithm that can be used for classification, as well as regression. …

Photo by Maciej Ruminkiewicz on Unsplash

In my previous article, I discussed and went through a working python example of Gradient Boosting for Regression. In this article, I would like to discuss how Gradient Boosting works for Classification. If you did not read that article, it’s all right because I will reiterate what I discussed in the previous article anyway. So, let’s get started!

Ensemble Methods

Usually, you may have a few good predictors, and you would like to use them all, instead of painfully choosing one because it has a 0.0001 accuracy increase. In comes Ensemble Learning. In Ensemble Learning, instead of using a single predictor, multiple…


One of the most powerful ways of training models is to train multiple models and aggregate their predictions. This is the main concept of Ensemble Learning. While many flavours of Ensemble Learning exist, some of the most powerful algorithms and Boosting Algorithms. In my previous article, I broke down one of the most popular Boosting Algorithms; Adaptive Boosting. Today, I want to talk about its equally powerful twin; Gradient Boosting.

Boosting & Adaptive Boosting vs Gradient Boosting

Vagif Aliyev

A High School student with a passion for AI

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store