new_qshap_result: Constructor for qshap_result class

View source: R/classes.R

new_qshap_resultR Documentation

Constructor for qshap_result class

Description

Creates a qshap_result object to store Q-SHAP R-squared results

Usage

new_qshap_result(
  rsq,
  feature_names = NULL,
  total_rsq = NULL,
  n_samples = NULL,
  n_features = NULL,
  loss = NULL,
  local_rsq = NULL
)

Arguments

rsq

Numeric vector of feature-specific R-squared values

feature_names

Character vector of feature names (optional)

total_rsq

Numeric total R-squared (sum of feature-specific values)

n_samples

Integer number of samples used

n_features

Integer number of features

loss

Optional raw observation-level squared-loss contribution matrix (n_samples x n_features).

local_rsq

Optional matrix of observation-level contributions to the global R-squared decomposition (n_samples x n_features). Its column sums equal the feature-specific values in rsq.

Value

An object of class qshap_result


qshap documentation built on Aug. 23, 2026, 5:11 p.m.