Machine Learning

Machine Learning: Cleaning data
I n the previous post, we saw how to import data from different type of file sources using various packages available in python. If you haven't gone through Importing data using Python. I recommend going through it before stepping into this post. Once we have data imported into dataset its very important to understand the data before proceeding further. It's important to understand the attributes (columns) of our dataset provided. Whenever we obtain a new dataset, our first task is to do…

Hierarchical clustering algorithm in Python
In the previous post, Unsupervised Learning k-means clustering algorithm in Python we discussed the K Means clustering algorithm. We learned how to solve Machine Learning Unsupervised Learning Problem using the K Means clustering algorithm. If you don't know about K Means clustering algorithm or have limited knowledge, I recommend you to go through the post. In this post, we will be looking at the Hierarchical Clustering algorithm which is used to solve the Unsupervised Learning problem. As…

Logistic Regression Detailed Explanation
Logistic regression is a binary classification model, i.e. it will help to make predictions in cases where the output is a categorical variable. We cannot draw a line and classify data points into two classes. So we can use the curve also known as the sigmoid curve. The sigmoid function is represented as: $$ 1\over {1 + e^{-(\beta_0 + \beta_1x)}}$$ As we know Linear Regression is represented as: $$h_\theta(x) = w^Tx$$ and the Logistic regression is represented as \(h_\theta(x) = g(w^Tx…

Limitations of the Linear Regression
In the previous post, we discussed a Simple Linear Regression detailed Explanation. I recommend you to go through the post to have a detailed understanding of the Simple Linear Regression. There are a few assumptions that Linear Regression has to find the best fit line. NOTE: This assumptions hold true for Simple and Multi Linear Regression. Let's understand the assumptions of Linear Regression and discuss them in detail. Limitations of the Linear Regression We cannot apply linear…

Decision Tree Detailed Explanation
Decision Tree (a tree-based algorithm) is high interpretability and an intuitive algorithm. It works almost the same as that of the human mind works for decision making. We can think of it as a nested if and else statements forming an upside-down tree. Therefore, it is very easy to explain the results of the model to the business team. As you can see in the diagram shown above, on each node we ask the question and based on the answer we either go left or right. Also, note that the leaf of…