qshap_result: User-friendly constructor for qshap_result

View source: R/classes.R

qshap_resultR Documentation

User-friendly constructor for qshap_result

Description

User-friendly constructor for qshap_result

Usage

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

A validated qshap_result object


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