feature_importance.classifier: Evaluate Feature Importance

View source: R/classifier.R

feature_importance.classifierR Documentation

Evaluate Feature Importance

Description

Uses "marginal" or "standalone" approaches:

  • marginal: remove block and see change in accuracy

  • standalone: use only that block and measure accuracy

Usage

## S3 method for class 'classifier'
feature_importance(
  x,
  new_data,
  ncomp = NULL,
  blocks = NULL,
  metric = c("cosine", "euclidean", "ejaccard"),
  fun = rank_score,
  normalize_probs = FALSE,
  approach = c("marginal", "standalone"),
  ...
)

Arguments

x

classifier

new_data

new data

ncomp

...

blocks

a list of feature indices

metric

...

fun

a function to compute accuracy (default rank_score)

normalize_probs

logical

approach

"marginal" or "standalone"

...

args to projection

Value

a data.frame with block and importance


bbuchsbaum/multivarious documentation built on Dec. 23, 2024, 7:47 a.m.