weighted_importance: Weighted projection variable importance for a random forest.

View source: R/ppmodel.R

weighted_importanceR Documentation

Weighted projection variable importance for a random forest.

Description

Weights each tree's projection-based importance by a per-tree OOB quality score — '1 - error_rate' in '[0, 1]' for classification, and 'max(0, 1 - NMSE)' in '[0, 1]' for regression — then aggregates 'I_s × |a_j|' over splits. Computed lazily from the training data stored on the model; the result is cached.

Usage

weighted_importance(model)

Arguments

model

A pprf forest model.

Details

**Sign semantics.** Entries are non-negative by construction (weights and per-split contributions are both non-negative). A zero entry means "this feature never appeared in a weighted OOB-contributing split," not "within noise." Contrast with permuted_importance, where negative values are meaningful. Do not re-normalize — rely on the ranking.

Value

A non-negative numeric vector, one entry per feature.


ppforest2 documentation built on July 21, 2026, 9:07 a.m.