Skip to content

eskayML/employee-attrition-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EMPLOYEE ATTRITION PREDICTION

This repository contains a streamlit application with enabled function calling , that predicts employees attrition using a xgboost machine learning model.

Below is the Demo showing , the app in action

Attrition video demo

MODEL DEVELOPMENT

The main notebook covers all the stages of cleaning, preprocessing and training the provided dataset.

The algorithm used here is XGBoost and achieved an F1 score of 0.9003, after extensive hyperparameter optimization and feature selection

Why F1?

I used F1 score because we are dealing with an imbalanced dataset , and we need a balanced way to evaluate the performance of the model

$F1 = 2 * (precision * recall) / (precision + recall)$

FUNCTION CALLING

For this part, I made use of langchain to make the whole process very cohesive. Also for the LLM , I am making use of the newly released Llama 3.1-70b model , it is a very versatile model, and has been trending a lot because of its spectaular performance on function calling.

Set up Locally

To set this up locally, start by cloning the application

git clone https://github.com/eskayML/employee-attrition-prediction

Once you're inside the peepalytics-assessment directory after cloning, you can run

pip install -r requirements.txt

Locally, You will need to add a file named secrets.toml to the .streamlit/ folder , this would be where the api keys are stored securely for streamlit to access

for the secret key, you would need a Groq api key, you can get one at https://console.groq.com/keys

you insert your groq keys into the created secrets.toml file

GROQ_API_KEY = "your groq api key"

Then finally go back to the terminal and execute

streamlit run app.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published