Skip to main content

Short Description

This is the package provides functionality for visualizing the classifiers decision boundaries.

It is based on the work of Cristian Grosu for the master thesis project for 2023 at Utrecht University. If you use this package, please cite the following paper: [Decision Boundary Maps for Supporting User-Driven Pseudo-labeling](https://drive.google.com/file/d/12PlvWEYmDpdhF0HefwSeEEbx4VUFtDGA/view?usp=sharing)

The package is available on PyPI and can be installed using pip: pip install decision-boundary-mapper

Documentation

See more details at https://decisionboundarymapper.000webhostapp.com/

Usage exmaples

  1. This package comes with a simple GUI that allows you to visualize the decision boundaries of a classifier. The GUI is based on the PySimpleGUI package and can be started by running the following code:
from decision_boundary_mapper import GUI

GUI().start()
  1. The package comes with two examples of complete pipelines for visualizing the decision boundaries of a classifier. Both examples use MNIST (handwritten digits) dataset. The first example DBM_usage_example uses t-SNE to project the data from the nD space to the 2D space, then neural network is trained to fit the inverse projection from 2D to nD and the decision boundaries are visualized using the 2D projection. The second example SDBM_usage_example uses a neural network with an autoencoder architecture to learn the projection and the inverse projection. After which a simple classifier is used to color each point of the 2D projection. The examples can be found in the examples folder.
from decision_boundary_mapper import DBM_usage_example, SDBM_usage_example

DBM_usage_example() # run the first example
SDBM_usage_example() # run the second example
  1. The package main functionality comes in two classes DBM (i.e. learns inverse projection when a 2D projection is given) and SDBM (i.e. learns both the projection and the inverse projection). The classes can be used as follows:
from decision_boundary_mapper import DBM, SDBM
from matplotlib import pyplot as plt

# load the data
...
X_train, X_test, y_train, y_test = load_data() 
...
# create a simple neural network
...
classifier = ... # for compatibility with the package the classifier should be constructed using tensorflow.keras
...

dbm = DBM(classifier) # create a DBM object
img, img_confidence, _, _ = dbm.generate_decision_boundary(X_train, y_train, X_test, y_test, resolution = 256) # generate the decision boundary

sdbm = SDBM(classifier) # create a SDBM object
img, img_confidence, _, _ = sdbm.generate_decision_boundary(X_train, y_train, X_test, y_test, resolution = 256) # generate the decision boundary
...
# visualize the decision boundaries
plt.imshow(img)
plt.show()

Created by Cristian Grosu for the master thesis project for 2023 at Utrecht University

Metadata

Release files for decision-boundary-mapper 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for decision-boundary-mapper 1.0.1
File Size Uploaded
decision-boundary-mapper-1.0.1.tar.gz 145.8 kB Details

Release files / decision-boundary-mapper-1.0.1.tar.gz

Download URL decision-boundary-mapper-1.0.1.tar.gz
Size 145.8 kB
Tags Source
SHA-256 checksum
How to use checksums
64693263fe3f47869bf3e1eb1b5b4c30a1783495f672d359d6d4bb965d7d6e65
BLAKE2b-256 checksum
How to use checksums
25897c85982766e0c64fcb1dc53c9b26b1f406e5a45dda794b9cb3a2856ad723
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.12

1 release file

0.6.11

1 release file

0.6.10

1 release file

0.6.9

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.8

1 release file

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page