Machine Learning Project 1: Predict Salary using Simple Linear Regression

Omair Aasim
Analytics Vidhya
Published in
4 min readSep 1, 2019

--

source pixabay.com

I’m going to be writing a series of articles starting from basic Machine Learning projects all the way to advanced ones.

#100DaysOfMLCode #100ProjectsInML

The best approach for me to learn anything is by working on sample projects. No matter how simple the project is, it helps me better understand the concepts. So I will be working through some small mini projects as part of this learning journey.

There are 100’s of excellent resources out there to help you get started. I stumbled upon this A-Z Machine learning course on Udemy and I’ll be walking through those examples in the first few weeks.

Today I’ll be going through “Simple Linear Regression

image source: A-Z Machine Learning Udemy

Dataset

First let’s look at the dataset. It is Salary_Data.csv and can be found here.
It has 2 columns — “Years of Experience” and “Salary” for 30 employees in a company. So in this example, we will train a Simple Linear Regression model to learn the correlation between the number of years of experience of each employee and their respective salary. Once the model is trained, we…

--

--

Omair Aasim
Analytics Vidhya

Passionate about building products — An advocate of AI, a software engineer by profession — an entrepreneur at heart and a sports enthusiast.