Course Content
Data Reading using Python
As a data scientist we should be able to read different types of datasets. In this lesson, we will cover how to read dataset in different formats using Python and its various modules.
0/1
Data Preprocessing
In this section, we will cover various methods that can help us to clean the dataset and make it suitable for a machine learning model. In general, we will cover the basic methods that every data scientist should know. We will learn about encoding, outliers, null values, and hundling imbalance datasets. By the end of this section, you will be comfortable to preprocess the dataset and make it clean.
0/6
Project-1: Data Analysis Project
Welcome to the first project! This is going to be a very simple project which is about data analysis. Your task is to import the raw dataset and apply various methods to analyze and find the hidden trends from the dataset. We have already provided the solution as well, but you are recommended to try the project first by yourself and then look at the attached file for the solution.
0/1
Supervised Machine Learning
A machine learning is actually using some models to go through our dataset to find the trends and information from our data automatically. The machine learning can be superivsed or unsupervised. The supervised machine learning is when you have the target variable in our your dataset or you have a labeled dataset. The supervised machine learning will find the relation between the input data and the target variable and will use this relation to make prediction later. In this section, we will go through various kinds of supervised machine learning models and will analyze them.
0/4
Data Science and Machine Learning Using Python
About Lesson

A KNN (k-nearest neighbors) is a supervised machine learning model used mostly for classification tasks. It uses the distance formula to classify the testing dataset. The model is suitable for both binary and multi-class classification tasks. It is mostly efficient when you have a clustered dataset. This method might not work best for overlapping classes. 

What is the KNN Model?

A KNN model is a traditional method of classifying objects. To understand the workings of the model, we need to understand the distance formula. 

You can read a more comprehensive article on the KNN model from here: KNN hyperparameter tuning.

When the KNN model has to make a prediction, it will find the distance from the testing/incoming data to every data point in the training data and sort the distances in ascending order. Based on the K value, the model will check which is the top nearest distance. Then, the model will predict the testing dataset based on the majority voting. 

Why is KNN a Lazy model?

Among all the machine learning models, the KNN model is considered to be a lazy model. The reason is very simple. Unlike many other machine learning models which try to understand the dataset and find the relation between the input and the target variables when training the model. The KNN does nothing in the training part. It just stores the training dataset. When the model has to make predictions, it then starts calculating the distances and arranging them. For every prediction, it will calculate the distances again and again and that is the reason some people called the KNN as lazy learner.