Giter VIP home page Giter VIP logo

delusion-detector's Introduction

Delusion-Detector

A simple Node web app that uses Random Forest Regression to detect if a to-be-employee is lying about his previous salary.

This is a simple node app that accepts a companies salary data, i.e., a .csv file that has designations, salaries for those designations and a certain preordered level assigned with each designation depending upon the salary (higher the salary, higher the level). Besides this, the app also demands two inputs:

  • The level at which the employee was in the company (a fractional number between 1 and total number of designations) where the fractional part arises by virtue of years of experience. For instance, if I am working as a Senior Executive which is level number 6 with 3 years of experience, then if in my company promotions occur after an average of 6 years of continuing the same post, then my level becomes 6.5

  • The salary which the employee, while negotiations, claims to have had in the previous company.

The node app.js file then sends the information to a python script that implements Random Forest Regression , an ensemble Machine Learning Algorithm on the data to predict the possible salary of the employee.

The app then reports whether:

  • The employee is honest, i.e., told his exact salary
  • The employee understated his salary
  • The employee was trying to bluff the company, claiming more than he deserves. The app also gives the %Bluff of the employee

TO DETECT DELUSION, YOU'LL NEED

node
python 3.6 or later

INSTRUCTIONS

  • clone this Delusion-Detector on your local machine
  • Change the path to Python as per your machine in the options variable in app.js
  • cd Delusion-Detector
  • npm install
  • node app.js
  • Open your favorite browser and go to localhost:3000
  • Enter any .csv file that follows the aforementioned details(SampleData has two .csv files for reference )
  • Enter any level and Claimed Salary
  • The Output will be shown besides a Random Forest Regression Plot that will be saved in plotPics for trend analysis!

HAVE A LOOK!

Alt text Alt text Alt text Alt text

delusion-detector's People

Contributors

akshitaag avatar rahmeen14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

akshitaag

delusion-detector's Issues

Abstract away as much variable config from the core app as you can

Try to come up with a config.js or utilize environment variables when you've to set up things like path of python executable etc. Here's how you can implement this,

// app.js
var config = require('./config.js');
...
options.pythonPath = config.pythonPath;
// config.js
var info = {
                "pythonPath" : DEFAULT_PYTHON_PATH
};
module.exports = info;

You can extend and use this conveniently throughout the app, so that any new user who's only interested in implementing a different model in python than yours, would not need to dig through the node.js app part, and would only update csv and config. Similarly, if one has to improve the node app itself, he/she would be able to focus more on the core app without worrying anything which would break the dependency on python, even accidentally.

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.