The project incorporates techniques of Explainable AI such as Shapley Additive Explanations, Local Interpretable Model-Agnostic Explanations and Partial Dependency Plots.
- Download the project as zip in upper right corner of clone the project on your machine.
- Open the project in your desired code editor.
- In the console move to folder
- In Conda console create the environment with command:
conda create --name <your-name>
- Activate environment
activate <your-name>
- Run following command to isntall packages from requirements.txt
conda install --file requirements.txt
- Run individual Jupyter Notebook blocks to display the code results.
Data processing:
The project loads a big dataset that is later processed into the more appropriate set of features.
It uses a machine learning model to classify the set of values for bankruptcy.
Data Modeling:
Columnar data is parsed into ensemble model and then optimized using Bayesian Search Space to determine the best features.
Data Explanation:
Data is explained using multiple etchniques to better understand how it changes over time, instance and with/without inclusion of one feature.
Model Training:
A XGBoost Regression is trained on the scaled data coming from bankruptcy dataset.
The model learns to predict the probability of comany going bankrupt.
Explains why a particular text was classified in a certain way by highlighting key words.
It calculates how the prediction would change if a specific feature were included or excluded, across all possible combinations of features.
Each feature gets a SHAP value:
Positive SHAP value → pushes the prediction higher.
Negative SHAP value → pushes the prediction lower.
If you have Docker, you can access the model via fast api with post method.'''python docker pull <your_username>/bankruptcy-prediction-api:v1 '''
'''python docker run -d -p 80:80 <your_username>/bankruptcy-prediction-api:v1 '''
You can access the frontend interface by going to the subfolder frontend/bank and running following command:'''python python manage.py runserver '''
After a couple of seconds the project will open. Then follow the console link or manually open local address http://127.0.0.1:8000/bankruptcy/ The user interface contains 4 pages:
- Home page
- Prediction page where you can test the model with your own data
- Contact page with the email address
- About page with information about the project