Learn R Programming

MLwrap (version 0.3.0)

table_h2_total: Friedman's H-Statistic Table

Description

The table_h2_total() function computes the global Friedman H-statistic for each feature, quantifying how much of a variable's predictive contribution arises from interactions with other features rather than from its individual main effect. This metric provides a model-agnostic measure of overall interaction strength, following the formulation presented in Interpretable Machine Learning by Christoph Molnar.

The resulting table ranks all features by their global H-statistic, helping identify which predictors participate most in interaction-driven behavior.

Usage

table_h2_total(analysis_object, show_table = FALSE)

Value

A dataframe containing the global H-statistic for each feature.

Arguments

analysis_object

A fitted wrap_object with results from sensitivity_analysis(methods = "Friedman H-stat") or compatible internal computations.

show_table

Logical. If TRUE, prints the table (default = FALSE).

References

Molnar, C. (2022). Interpretable Machine Learning.
https://christophm.github.io/interpretable-ml-book/

See Also

sensitivity_analysis

Examples

Run this code
# After running sensitivity_analysis(wrap_object, methods = "Friedman H-stat"):
# table_h2 <- table_h2_total(wrap_object)

Run the code above in your browser using DataLab