Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OUI Algorithm Visualizations

This repository contains a collection of interactive visualizations for various algorithms. Each module is designed to be standalone and can be run independently.

Modules

  • 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.

Setup

  1. Install the uv package manager

  2. Create a virtual environment and install the dependencies:

uv venv
uv sync
  1. Run the application:
uv run python src/main.py

Development

The 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.

Adding a new module

  1. Create a new directory in the modules directory.
  2. Create a new module.py file in the new directory.
  3. 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_names dict, and used to group modules.
  4. Add the new module to the MainMenu's MODULES list.

Code standard

  • Follow the structure of the existing modules.
  • Use the ruff formatter and linter:
    uvx ruff check src
    uvx ruff format src
  • Use type hints

Build

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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages