# Classification using Logistic Regression

In my last article, I explained Linear Regression which is used to predict a continuous value like a stock or a house price. The value can be any real number. But there is another type of important problem in machine learning, the classification problem. This article will cover how logistic regression works and how it can be used to solve the classification problem. If you have not read my last article (https://ahaanpandya.medium.com/linear-regression-explained-868914443188), I highly recommend to read it before this. The difference between Linear and Logistic Regression, Image from https://dev.to/adityaberi8/logistic-regression-eg1

# Binary Classification

We will first take a look at Binary Classification which involves classifying inputs into only two classes. For example, classifying…

# Linear Regression Python Implementation

In my last article, I focused on how the algorithm works and the theory behind linear regression but now in this article, I will focus on implementing it in Python, which is an excellent programming language for Data Science and Machine Learning. If you have not read my last article, I highly recommend to read it here: https://ahaanpandya.medium.com/linear-regression-explained-868914443188

Note- I will be using Pandas and Numpy which are python data science libraries and if you are not comfortable with Numpy and Pandas then you might want to look up a tutorial on those libraries. …

# Linear Regression Explained

Linear Regression is one of the most fundamental algorithms in Machine Learning you will ever encounter. Linear Regression involves fitting a linear function through the data which can be used to predict a continuous linear value like prices, stocks, houses, etc. A continuous value is anything that can be any real number. Regression involves predicting continuous real values and classification involves predicting classes. But this article will only cover regression. This shows linear regression where the blue points are the training examples and the red line is the line of best-fit Image by https://en.wikipedia.org/wiki/Linear_regression

Note: This article will use university mathematics so a strong grasp on multivariable calculus (especially partial derivatives) and linear algebra is recommended.

This article will teach you how single variable… 