Giter VIP home page Giter VIP logo

salary-prediction--lnr-gbr's Introduction

Salary Prediction using Linear Regression and Gradient Boosting Regressor

Problem -

Predict salaray based on multiple features.

Data

What we have

  • We have 2 files - Train and Test File.
  • Train file has 100k observations with 7 features
  • 4 categorical and 2 numerical data

We have data as in below alt tex

Data Preparataion

We ran through data processing to look for following

  • Nulls
  • Data types to see if numerical columns are marked as object
  • how many categorical and numericals columns in the dataframe

Feature Engineering

Hot Encoding the categorical values

Used hot encoding to convert the categorical values to numerical values as below, as the models only work on the numerical columns alt tex

Correlation features to Salary

Evaluated the correlation to see which featured need to be considered. alt tex

alt tex

alt tex

alt tex

alt tex

alt tex

alt tex

From the Correlation, Company ID doenst have impact on Salary, so will be ignored.

Model

Evaluated 2 models - Linear Regression and Gradient Boosting Regressor

Linear Regression

Predicted VS Real Plot

alt tex

MSE Evaluation

alt tex

Gradient Boosting Regressor

Predicted VS Real Plot

alt tex

MSE Evaluation

alt tex

Conclussion

Although Predicted VS Real plots looks same, from further evaluations MSE numbers, GBR seems to be better model.

Using GBR, evaluated the Features to see which has more impact

alt tex

And Finally the Predicted Salaries using GBR Model

alt tex

salary-prediction--lnr-gbr's People

Contributors

manoharpavuluri avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

pheerawadee

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.