Abstract
Binclass Tools is an open-source Data Science project. The binclass-tools package contains a set of Python wrappers and interactive plots that facilitate the analysis of binary classification problems. It is built using Jupyter Notebook, Machine Learning, Python. The complete source code is publicly available on GitHub under the BSD 3-Clause "New" or "Revised" License, making it a useful reference for students building a Data Science mini project or final-year project.
1. Introduction
A set of Python wrappers and interactive plots that facilitate the analysis of binary classification problems.
Finding the Best Classification Threshold for Imbalanced Classifications with the Interactive Confusion Matrix and Line Charts
2. Objective
The binclass-tools package contains a set of Python wrappers and interactive plots that facilitate the analysis of binary classification problems.
This project demonstrates how Jupyter Notebook, Machine Learning, Python can be applied to a real-world Data Science problem.
4. Technology Stack
- Powerful interactive charts that simplify the analysis of a binary classifier's performance, including calibration and any amounts and costs associated with individual observations.
- A set of functions that return the values of metrics useful for measuring the performance of a binary classifier, for each threshold value if dependent on it.
- A set of generic wrappers that help the analyst in daily operations dealing with binary classifications.
- scikit-learn (>=0.22.1)
- matplotlib
- nbformat (>= 4.2.0)
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- Python 3.8 or later with Jupyter Notebook / JupyterLab (or Google Colab)
- pip for dependencies
- Python 3.8 or later
- pip / virtualenv for dependencies
- VS Code, PyCharm or Jupyter Notebook
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/lucazav/binclass-tools.git
cd binclass-tools- Python 3.6+
- A set of the most popular packages used for working with data
- Plotly for interactive plots
- The size of the step separating one threshold value from the other (always considering the extremes 0 and 1 inclusive).
- The list of individual amounts associated with each of the observables in the test dataset (since the dataset is generated by random values, the absolute value of column 13 is considered as the amount column).
- Which currency symbol to use.
pip install binclass-toolspip install git+https://github.com/lucazav/binclass-toolsimport numpy as np
import pandas as pd
import bctools as bcfrom sklearn.ensemble import RandomForestClassifier
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_splitFull setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Turn the analysis into an interactive dashboard
- Automate data refresh with a scheduled job
- Add a predictive model on top of the analysis
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- What is the source of the dataset and how was missing data handled?
- Which exploratory analysis steps revealed the most useful insight?
- Why were these particular charts chosen to present the data?
- Which statistical or ML technique supports the conclusions?
- How could the analysis be automated or refreshed with new data?
9. Source Code & License
This project is developed by lucazav and published on GitHub under the BSD 3-Clause "New" or "Revised" License. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on a Data Science project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for Data Science Internship