BayesNet
Bayesian Network Classifiers library
Setup
Using the vcpkg library
You can use the library with the vcpkg library manager. In your project you have to add the following files:
vcpkg.json
{
"name": "sample-project",
"version-string": "0.1.0",
"dependencies": [
"bayesnet"
]
}
vcpkg-configuration.json
{
"registries": [
{
"kind": "git",
"repository": "https://github.com/rmontanana/vcpkg-stash",
"baseline": "393efa4e74e053b6f02c4ab03738c8fe796b28e5",
"packages": [
"folding",
"bayesnet",
"arff-files",
"fimdlp",
"libtorch-bin"
]
}
],
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg",
"baseline": "760bfd0c8d7c89ec640aec4df89418b7c2745605"
}
}
CMakeLists.txt
You have to include the following lines in your CMakeLists.txt
file:
find_package(bayesnet CONFIG REQUIRED)
add_executable(myapp main.cpp)
target_link_libraries(myapp PRIVATE bayesnet::bayesnet)
After that, you can use the vcpkg
command to install the dependencies:
vcpkg install
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.
Playing with the library
The dependencies are managed with vcpkg and supported by a private vcpkg repository in https://github.com/rmontanana/vcpkg-stash.
Getting the code
git clone https://github.com/doctorado-ml/bayesnet
Once you have the code, you can use the make
command to build the project. The Makefile
is used to manage the build process and it will automatically download and install the dependencies.
Release
make init # Install dependencies
make release # Build the release version
make buildr # compile and link the release version
Debug & Tests
make init # Install dependencies
make debug # Build the debug version
make test # Run the tests
Coverage
make coverage # Run the tests with coverage
make viewcoverage # View the coverage report in the browser
Sample app
After building and installing the release version, you can run the sample app with the following commands:
make sample
make sample fname=tests/data/glass.arff