% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xgb.plot.shap.R \name{xgb.shap.data} \alias{xgb.shap.data} \title{Prepare data for SHAP plots. To be used in xgb.plot.shap, xgb.plot.shap.summary, etc. Internal utility function.} \usage{ xgb.shap.data( data, shap_contrib = NULL, features = NULL, top_n = 1, model = NULL, trees = NULL, target_class = NULL, approxcontrib = FALSE, subsample = NULL, max_observations = 1e+05 ) } \value{ A list containing: 'data', a matrix containing sample observations and their feature values; 'shap_contrib', a matrix containing the SHAP contribution values for these observations. } \description{ Prepare data for SHAP plots. To be used in xgb.plot.shap, xgb.plot.shap.summary, etc. Internal utility function. }