Bayesian Network Classifiers library
You can use the library with the Conan package manager. In your project you need to add the following files:
[requires]
bayesnet/1.1.2
[generators]
CMakeDeps
CMakeToolchainInclude 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 buildNote: 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.
The project uses Conan for dependency management and provides convenient Makefile targets for common tasks.
- Conan package manager (
pip install conan) - CMake 3.27+
- C++17 compatible compiler
git clone https://github.com/doctorado-ml/bayesnet
cd bayesnetmake release # Configure release build with Conan
make buildr # Build the release versionmake debug # Configure debug build with Conan
make buildd # Build the debug version
make test # Run the testsmake coverage # Run tests with coverage analysis
make viewcoverage # View coverage report in browserRun 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 modeldebug- Configure debug build using Conanrelease- Configure release build using Conanbuildd- Build debug targetsbuildr- Build release targetstest- Run all tests (useopt="-s"for verbose output)coverage- Generate test coverage reportviewcoverage- Open coverage report in browsersample- Build and run sample applicationconan-create- Create Conan packageconan-upload- Upload package to Conan remoteconan-clean- Clean Conan cache and build foldersclean- Clean all build artifactsdoc- Generate documentationdiagrams- Generate UML diagramshelp- Show all available targets
