Skip to content

bips-hb/cpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

238e428 · Nov 25, 2024

History

96 Commits
Nov 25, 2024
Nov 25, 2024
Nov 25, 2024
Nov 25, 2024
Nov 5, 2024
Mar 2, 2022
Feb 23, 2022
Feb 23, 2022
Nov 5, 2024
Feb 23, 2022
Nov 5, 2024
Nov 5, 2024
Feb 24, 2022

Repository files navigation

check-standard

Conditional Predictive Impact

David S. Watson, Marvin N. Wright

Introduction

The conditional predictive impact (CPI) is a measure of conditional independence. It can be calculated using any supervised learning algorithm, loss function, and knockoff sampler. We provide statistical inference procedures for the CPI without parametric assumptions or sparsity constraints. The method works with continuous and categorical data.

Installation

To install the ranger R package from CRAN, just run

install.packages("cpi")

To install the development version from GitHub using devtools, run

devtools::install_github("bips-hb/cpi")

Examples

Calculate CPI for random forest on iris data with 5-fold cross validation:

library(mlr3)
library(mlr3learners)
library(cpi)

cpi(task = tsk("iris"), 
    learner = lrn("classif.ranger", predict_type = "prob"),
    resampling = rsmp("cv", folds = 5), 
    measure = "classif.logloss", test = "t")

References

  • Watson D. S. & Wright, M. N. (2021). Testing conditional independence in supervised learning algorithms. Machine Learning. DOI: 10.1007/s10994-021-06030-6.

About

CPI: Conditional Predictive Impact

Resources

Citation

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages