Skip to content
Doctorado-MLPublic

About

Some Bayesian Classifiers using Torchlib

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

737 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo BayesNet

C++ License: MIT Gitea Release Codacy Badge Security Rating Reliability Rating zread Ask DeepWiki Gitea Last Commit Coverage Badge DOI

Bayesian Network Classifiers library

Using the Library

Using Conan Package Manager

You can use the library with the Conan package manager. In your project you need to add the following files:

conanfile.txt

[requires]
bayesnet/1.4.0

[generators]
CMakeDeps
CMakeToolchain

CMakeLists.txt

Include the following lines in your CMakeLists.txt file:

find_package(bayesnet REQUIRED)

add_executable(myapp main.cpp)

target_link_libraries(myapp PRIVATE bayesnet::bayesnet)

Then install the dependencies and build your project:

conan install . --output-folder=build --build=missing
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake
cmake --build build

Note: In the sample folder you can find a sample application that uses the library. You can use it as a reference to create your own application.

Building and Testing

The project uses Conan for dependency management and provides convenient Makefile targets for common tasks.

Prerequisites

  • Conan package manager (pip install conan)
  • CMake 3.27+
  • C++17 compatible compiler

Getting the code

git clone https://github.com/doctorado-ml/bayesnet
cd bayesnet

Build Commands

Release Build

make release        # Configure release build with Conan
make buildr         # Build the release version

Debug Build & Tests

make debug          # Configure debug build with Conan
make buildd         # Build the debug version
make test           # Run the tests

Coverage Analysis

make coverage       # Run tests with coverage analysis
make viewcoverage   # View coverage report in browser

Sample Application

Run the sample application with different datasets and models:

make sample                                    # Run with default settings
make sample fname=tests/data/glass.arff       # Use glass dataset
make sample fname=tests/data/iris.arff model=AODE  # Use specific model

Available Makefile Targets

  • debug - Configure debug build using Conan
  • release - Configure release build using Conan
  • buildd - Build debug targets
  • buildr - Build release targets
  • test - Run all tests (use opt="-s" for verbose output)
  • coverage - Generate test coverage report
  • viewcoverage - Open coverage report in browser
  • sample - Build and run sample application
  • conan-create - Create Conan package
  • conan-upload - Upload package to Conan remote
  • conan-clean - Clean Conan cache and build folders
  • clean - Clean all build artifacts
  • doc - Generate documentation
  • diagrams - Generate UML diagrams
  • help - Show all available targets

Models

- TAN

- KDB

- SPODE

- SPnDE

- AODE

- A2DE

- XBAODE

- BoostA2DE

- XBA2DE

Accepts max_memory_gb, a working-memory budget for the ensemble in gigabytes (1 GB = 2^30 bytes, default 0.0 = unlimited). It bounds what the accumulated XSp2de models hold, and acts as an exit condition of the boosting loop: when the next model no longer fits, training stops and the classifier records a Memory limit reached note with status = WARNING.

With Local Discretization

- TANLd

- KDBLd

- SPODELd

- AODELd

Documentation

Diagrams

UML Class Diagram

BayesNet UML Class Diagram

Dependency Diagram

BayesNet Dependency Diagram

About

Some Bayesian Classifiers using Torchlib

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages