Kernel Partial Correlation Coefficient
Overview
Implementations of two empirical versions the kernel partial correlation (KPC) coefficient and the associated variable selection algorithms. KPC is a measure of the strength of conditional association between Y and Z given X, with X, Y, Z being random variables taking values in general topological spaces. As the name suggests, KPC is defined in terms of kernels on reproducing kernel Hilbert spaces (RKHSs). The population KPC is a deterministic number between 0 and 1; it is 0 if and only if Y is conditionally independent of Z given X, and it is 1 if and only if Y is a measurable function of Z and X. One empirical KPC estimator is based on geometric graphs, such as K-nearest neighbor graphs and minimum spanning trees, and is consistent under very weak conditions. The other empirical estimator, defined using conditional mean embeddings (CMEs) as used in the RKHS literature, is also consistent under suitable conditions. Using KPC, a stepwise forward variable selection algorithm KFOCI (using the graph based estimator of KPC) is provided, as well as a similar stepwise forward selection algorithm based on the RKHS based estimator. For more details on KPC, its empirical estimators and its application on variable selection, see Huang, Z., N. Deb, and B. Sen (2022). “Kernel partial correlation coefficient – a measure of conditional dependence” (URL listed below). When X is empty, KPC measures the unconditional dependence between Y and Z, which has been described in Deb, N., P. Ghosal, and B. Sen (2020), “Measuring association on topological spaces using kernels and geometric graphs” doi:10.48550/arXiv.2010.01768, and it is implemented in the functions KMAc() and Klin() in this package. The latter can be computed in near linear time.
- Update for mlpack 4.8.0 API change.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-05-06
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 9
- Examples that run
- 100%6 run in a plain check
- Exported functions with examples
- 86%
- Documented parameters
- 83%
- Return-value docs
- 100%
- Help pages citing references
- 22%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 309
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
1 development-tooling and community-health practice detected across 1 family in the upstream repository
Checks run against github.com/zh2395/kpc on 2026-10-18.
Dependencies
Installing KPC adds 8 packages (8 with compiled code, 12 MB of source tarballs). Heaviest: data.table 5.7 MB, mlpack 2.0 MB, Rcpp 1.8 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.1.4Latest
- 0.1.32026-05-02 · diff ↗
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.1.22022-10-05 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.1.12021-12-08 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 0.1.02021-01-08
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2021-01-08
- Total releases
- 5 / 5 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.5.0
- Bundled data
- 15 KB / 2 files
- Download size
- 35 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("KPC")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.