# Depth-First Search vs. Breadth-First Search in Python

## The simplified explanation of the two traversals algorithm.

When it comes to learning, there are generally two approaches: we can go wide and try to cover as much of the spectrum of a field as possible, or we can go deep and try to get specific with the topic that we are learning. Most good learners know that, to some extent, everything we learn in life — from algorithms to necessary life skills — involves some combination of these two approaches. …

# Supervised vs. Unsupervised Learning

## When to use supervised learning or unsupervised learning?

If we don’t know what the objective of the machine learning algorithm is, we may fail to build an accurate model. Knowing the types of Machine learning algorithms is essential. It helps us to see a bigger picture of machine learning, what is the goal of all the things that are being done in the field and especially, put us in a better position to break down a real problem and design a machine learning system.

The goal of most machine learning algorithms is to construct a model or a hypothesis. All machine learning models categorize as either supervised or unsupervised. …

# Multiple Linear Regression in Python

## How to perform multiple linear regression in Python using sklearn?

Linear regression is a standard statistical data analysis technique. We use linear regression to determine the direct relationship between a dependent variable and one or more independent variables. The dependent variable must be measured on a continuous measurement scale, and the independent variable(s) can be measured on either a categorical or continuous measurement scale.

In linear regression, we want to draw a line that comes closest to the data by finding the slope and intercept, which define the line and minimize regression errors. There are two types of linear regression: simple linear regression and multiple linear regression. …

# Stacks and Queues in Python

## The simplified explanation of the two data structures.

Have you ever seen a stack of books or you stand in the queue(line) when you wanted to have dinner at your favorite restaurant? We come across stack and queue like objects every day. Stacks and Queues are probably the most self-explanatory data structures, but to some, they can still seem intimidating.

In this note, we are going to talk about what stacks and queues in terms of computer science, what operations we can perform with them, we also look at a brief implementation of both using Python. Let’s hop to it!

# Stacks

A stack is a data structure that contains many elements. Stacks are linear, that is, there are a sequence and an order to how they are constructed and traversed. …

Understanding the linked list and its implementation in Python.

Data structures provide different ways to store and organize data; variables, arrays, hashes, and objects are all types of data structures. Regardless of which language we start coding in, we encounter data structures. One of those complicated things for me has always been linked lists. I’ve known about linked lists for a few years now, but I can never keep them straight in my head. I only think about them while preparing for a technical interview. I do a little research and believe that I understand what they’re about, but after a few weeks, I forget them again. It’s because I don’t fundamentally understand them! Writing this note helps me understand the linked list on a deeper level. …

# Understanding the Mean Squared Error

If you spend enough time reading about statistics and machine learning, there’s a good chance that you’ll repeatedly encounter the same ideas, terms, and concepts. Some of them start to become more familiar with time and you’ll naturally begin to grasp them with enough repetition.

Occasionally, you’ll find some ideas and definitions that you think you know but haven’t run across them enough to comprehend them. For me, it’s the Mean Squared Error. I learned about Mean Squared Error last semester in a Probability course but didn’t have the context or tools to understand it.

Thankfully, over the course of writing this series, that has all changed. I’ve finally come to understand the Mean Squared Error. And hopefully, by the end of this post, you will too! …

# Machine Learning: Model Representation And Hypothesis

I have started doing Andrew Ng’s popular machine learning course on Coursera. Andrew Ng’s Machine Learning course is well-rated and stretches for about 3 months with roughly 5 hours of study every week. My favorite aspect is that there are no prerequisites (you don’t even need to know any programming language). After 3 months you will experience substantial growth in your knowledge. The course covers various supervised and unsupervised machine learning techniques, along with guidelines of when to apply each of them and what to do in case they don’t work.

The course was designed using MATLAB / OCTAVE, which I think was a wise choice. MATLAB / OCTAVE is the easiest language to implement and allows for a better understanding of the Machine Learning concepts. Once these concepts are learned, it’s relatively easy to apply them in any language you desire. …