Skip to content

KPC

Kernel Partial Correlation Coefficient

v0.1.3 · May 2, 2026 · GPL-3

Description

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.

Downloads

CRAN

459

Last 30 days

9091st

1.2K

Last 90 days

3.9K

Last year

Trend: -3% (30d vs prior 30d)

r2u CRAN

0

Last 30 days

32

Last 90 days

92

Last year

Trend: -100% (30d vs prior 30d)

autoCRAN

2

Last 7 days

5

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 6, 2026
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

Maintainer: ‘Zhen Huang <zh2395@columbia.edu>’

The Description field contains
  using kernels and geometric graphs” <arXiv:2010.01768>, and it is
Please refer to arXiv e-prints via their arXiv DOI <doi:10.48550/arXiv.YYMM.NNNNN>.
NOTE r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

Maintainer: ‘Zhen Huang <zh2395@columbia.edu>’

The Description field contains
  using kernels and geometric graphs” <arXiv:2010.01768>, and it is
Please refer to arXiv e-prints via their arXiv DOI <doi:10.48550/arXiv.YYMM.NNNNN>.

Code

Structure

Lines of code

1,146

Files

18

Compiled share

0%

Has compiled src

No

Language breakdown

R 703 (61.3%)Docs 443 (38.7%)

API

Exported functions

7

Internal functions

4

Recent export changes

v0.1.0+7 KFOCI, KMAc, KPCRKHS +4 more

Testing & CI

Has tests

No

Test-to-code ratio

0.00

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.0.0

System requirements

C++ standard

License

GPL-3

License flags

SPDX valid, OSI approved

History

Versions

4

First release

2021-01-08

Latest release

2026-05-02

Avg cadence

334 days

Cold removal rate

Dep drift

3

LOC over versions

v0.1.0: 1,103 LOCv0.1.1: 1,123 LOCv0.1.2: 1,099 LOCv0.1.3: 1,146 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (1)

suggests

Dependency Network

Dependencies Reverse dependencies data.table kernlab RANN proxy mlpack FORD KPC

Version History

5 tracked
updated 0.1.3 ← 0.1.2 diff May 2, 2026
new 0.1.2 Mar 10, 2026
updated 0.1.2 ← 0.1.1 diff Oct 4, 2022
updated 0.1.1 ← 0.1.0 diff Dec 7, 2021
new 0.1.0 Jan 7, 2021