2024-09-13 09:42:06 +02:00
2024-05-08 06:42:19 +00:00
2024-04-30 12:06:32 +02:00
2025-03-12 16:29:29 +01:00
2025-06-30 22:40:35 +02:00
2024-05-23 17:34:48 +00:00
2025-07-01 13:56:28 +02:00
2025-07-19 22:47:32 +02:00
2024-03-08 22:20:54 +01:00
2024-11-23 20:28:16 +01:00
2025-07-01 14:14:38 +02:00
2025-07-19 22:47:32 +02:00
2025-07-19 22:47:32 +02:00
2025-07-02 00:38:47 +02:00
2025-06-29 18:46:11 +02:00
2025-07-19 22:12:27 +02:00
2024-03-11 10:57:27 +01:00
2024-04-21 11:31:27 +02:00
2025-07-07 02:10:08 +02:00
2025-07-08 16:07:16 +02:00

logo BayesNet

C++ License: MIT Gitea Release Codacy Badge Security Rating Reliability Rating 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.1.2

[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

- BoostAODE

- XBAODE

- BoostA2DE

- XBA2DE

With Local Discretization

- TANLd

- KDBLd

- SPODELd

- AODELd

Documentation

Manual

Coverage report

Diagrams

UML Class Diagram

BayesNet UML Class Diagram

Dependency Diagram

BayesNet Dependency Diagram

Description
Bayesian Network Classifiers using libtorch from scratch
Readme MIT 14 MiB
2025-07-19 20:52:59 +00:00
Languages
C++ 94.8%
Makefile 2.1%
CMake 1.3%
Python 1%
Dockerfile 0.4%
Other 0.4%