wdm
A header-only C++ library for weighted dependence measures
Provides efficient implementations of weighted dependence measures and related independence tests:
- Pearsons's rho
- Spearmans's rho
- Kendall's tau
- Blomqvist's beta
- Hoeffding's D
All measures are computed in O(n log n) time, where n is the number of observations.
Functionality
The library provides:
- a function
wdm()
to compute the weighted dependence measures, - a class
Indep_test
to perform a test for independence based on asymptotic p-values.
For details, see the API documentation and the example below.
Dependencies
The library only requires C++11.
For projects already using the Eigen linear algebra library, there are convenience wrappers that can be made available via
Including the library in other projects
There are two options:
- Either copy the header files in
include/
to your project. - Install the headers globally using the CMake project. To do that go to the root repository of this repo and run: To use the library in your project, just add
target_link_libraries(your_proj_name wdm)
toyour_proj_name/CMakeLists.txt
.
You can then include the main header in your source code: