By Sahib Arora

This is a simple project in Python which predicts the salary of MBA students based on the marks the scored in their MBA finals.

This project helps predict the salary of MBA gradutaes based in the marks they scored using simple linear regression with 1 variable. We begin by importing the required libraries and printing the data frame, after which we add a constant (1) to the data to perform linear regression. After adding the constant we split the data into 2 sets, training and testing set where the training set consists of 80% of the data and the testing set contains the remaining 20%. After splitting we train the training data set with the OLS (ordinary least square) model to find the values which are applied to the test set. We finally plot a graph in which the red line is our predicted value and the blue points are the actual salary of the students.

Submitted by Sahib Arora (sahib2905)

Download packets of source code on Coders Packet

## Comments