Description
A general framework for constructing variable importance plots from various types of machine learning models in R. Aside from some standard model- specific variable importance measures, this package also provides model- agnostic approaches that can be applied to any supervised learning algorithm. These include 1) an efficient permutation-based variable importance measure, 2) variable importance based on Shapley values (Strumbelj and Kononenko, 2014) <doi:10.1007/s10115-013-0679-x>, and 3) the variance-based approach described in Greenwell et al. (2018) <doi:10.48550/arXiv.1805.04755>. A variance-based method for quantifying the relative strength of interaction effects is also included (see the previous reference for details).
Downloads
12.5K
Last 30 days
1119th
37K
Last 90 days
265.7K
Last year
Trend: +8.5% (30d vs prior 30d)
CRAN Check Status
Show all 14 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 | ERROR |
| r-devel-macos-arm64 | ERROR |
| 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 details (2 non-OK)
tests
Running ‘tinytest.R’ [6s/17s]
Running the tests in ‘tests/tinytest.R’ failed.
Complete output:
> if (requireNamespace("tinytest", quietly = TRUE)) {
+ home <- length(unclass(packageVersion("vip"))[[1L]]) == 4
+ tinytest::test_package("vip", at_home = home)
+ }
Attaching package: 'vip'
The following object is masked from 'package:utils':
vi
test_get_feature_names.R...... 0 tests
test_get_feature_names.R...... 0 tests
test_get_feature_names.R...... 0 tests
test_get_feature_names.R...... 1 tests OK
test_get_feature_names.R...... 2 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 4 tests OK
test_get_feature_names.R...... 5 tests O
...[truncated]...
R................ 0 tests 9ms [Exited at #6: Skip on CRAN]
test_pkg_randomForest.R....... 0 tests 9ms [Exited at #6: Skip on CRAN]
test_pkg_ranger.R............. 0 tests 9ms [Exited at #6: Skip on CRAN]
test_pkg_rpart.R.............. 0 tests 3ms [Exited at #6: Skip on CRAN]
test_pkg_stats.R.............. 0 tests 9ms [Exited at #6: Skip on CRAN]
test_pkg_tidymodels.R......... 0 tests 16ms [Exited at #5: Skip on CRAN]
test_pkg_xgboost.R............ 0 tests 9ms [Exited at #6: Skip on CRAN]
test_vi_firm.R................ 0 tests
test_vi_firm.R................ 0 tests
test_vi_firm.R................ 0 tests
test_vi_firm.R................ 0 tests
test_vi_firm.R................ 0 tests Error in ranger(survived ~ ., data = titanic, probability = TRUE) :
could not find function "ranger"
Calls: <Anonymous> -> run_test_dir -> lapply -> FUN -> eval -> eval
Execution halted
tests
Running ‘tinytest.R’ [1s/1s]
Running the tests in ‘tests/tinytest.R’ failed.
Complete output:
> if (requireNamespace("tinytest", quietly = TRUE)) {
+ home <- length(unclass(packageVersion("vip"))[[1L]]) == 4
+ tinytest::test_package("vip", at_home = home)
+ }
Attaching package: 'vip'
The following object is masked from 'package:utils':
vi
test_get_feature_names.R...... 0 tests
test_get_feature_names.R...... 0 tests
test_get_feature_names.R...... 0 tests
test_get_feature_names.R...... 1 tests OK
test_get_feature_names.R...... 2 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 3 tests OK
test_get_feature_names.R...... 4 tests OK
test_get_feature_names.R...... 5 tests OK
...[truncated]...
.R................ 0 tests 0ms [Exited at #6: Skip on CRAN]
test_pkg_randomForest.R....... 0 tests 0ms [Exited at #6: Skip on CRAN]
test_pkg_ranger.R............. 0 tests 0ms [Exited at #6: Skip on CRAN]
test_pkg_rpart.R.............. 0 tests 0ms [Exited at #6: Skip on CRAN]
test_pkg_stats.R.............. 0 tests 0ms [Exited at #6: Skip on CRAN]
test_pkg_tidymodels.R......... 0 tests 1ms [Exited at #5: Skip on CRAN]
test_pkg_xgboost.R............ 0 tests 0ms [Exited at #6: Skip on CRAN]
test_vi_firm.R................ 0 tests
test_vi_firm.R................ 0 tests
test_vi_firm.R................ 0 tests
test_vi_firm.R................ 0 tests
test_vi_firm.R................ 0 tests Error in ranger(survived ~ ., data = titanic, probability = TRUE) :
could not find function "ranger"
Calls: <Anonymous> -> run_test_dir -> lapply -> FUN -> eval -> eval
Execution halted
Additional Issues
Check History
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 27, 2026
tests
Running ‘tinytest.R’ [6s/11s]
Running the tests in ‘tests/tinytest.R’ failed.
Complete output:
> if (requireNamespace("tinytest", quietly = TRUE)) {
+ home <- length(unclass(packageVersion("vip"))[[1L]]) == 4
+ tinytest::test_package("vip",
...[truncated]...
ests
test_vi_firm.R................ 0 tests Error in ranger(survived ~ ., data = titanic, probability = TRUE) :
could not find function "ranger"
Calls: <Anonymous> -> run_test_dir -> lapply -> FUN -> eval -> eval
Execution halted