This repository contains a collection of interactive visualizations for various algorithms. Each module is designed to be standalone and can be run independently.
- Nomogram: Interactive visualization of a nomogram for Naive Bayes classification.
- D-Separation: Interactive visualization of d-separation: Graph visualization where you can select two nodes. The program then displays (colors, highlights) all sets of nodes that d-separate these two nodes.
- KNN: KNN visualization that plots data in 2D (point cloud) and for a selected test case and k parameter value shows the nearest neighbors and predicted class.
- Alpha-Beta Pruning: Visualize the alpha-beta pruning algorithm on a game tree.
- LST Scheduling: Visualize the LST scheduling algorithm.
-
Install the uv package manager
-
Create a virtual environment and install the dependencies:
uv venv
uv sync- Run the application:
uv run python src/main.pyThe core of the application is in the common directory:
- The App class is the main entry point for the application. It handles the main window, module switching, and help window.
- The Module class is the base class for all modules. It derives from tkinter.Frame and provides a common interface for all modules.
The modules are in the modules directory, including the
- MainMenu class is the main menu for the application.
- Create a new directory in the modules directory.
- Create a new module.py file in the new directory.
- Create a new class that derives from Module. The class must define:
- The init method, which takes a single argument, the App instance.
- The label attribute, which is the name of the module that will be displayed in the menu.
- The instructions attribute, which is the instructions for the module that will be displayed in the help window.
- The short_description attribute, which is the short description of the module that will be displayed in the menu.
- The category_key attribute, which is the category key of the module. Module keys are defined in MainMenu in the
category_namesdict, and used to group modules.
- Add the new module to the MainMenu's MODULES list.
- Follow the structure of the existing modules.
- Use the
ruffformatter and linter:uvx ruff check src uvx ruff format src
- Use type hints
Make sure you have the development dependencies installed:
uv sync --dev
Run the following command to build the application:
uv run pyinstaller build_exe.spec