This is a Python application that uses machine learning to predict employee attrition. It uses the Logistic Regression model from the sklearn library.
- Python 3.6 or higher
- pip (Python package installer)
- Open Terminal
- Create a new virtual environment:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Open Command Prompt Or PowerShell
- Create a new virtual environment:
py -m venv venv
- Activate the virtual environment:
.\venv\Scripts\activate
- Install the required packages:
pip install -r requirements.txt
- Ensure that the virtual environment is activated.
- Run the application:
python app.py
- The application expects a CSV file named 'WAFn-UseC-HR-Employee-Attrition.csv' in the same directory as the script. Make sure this file is present before running the application.
- The application will print various outputs to the console, including the original data, the preprocessed data, the feature importance, and the performance metrics of the model.
- The application will also fine-tune the model parameters using GridSearchCV and print the performance metrics of the best model.