% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree_explainer.R
\name{gazer}
\alias{gazer}
\title{Create a QSHAP Tree Explainer}
\usage{
gazer(model, max_depth = NULL, base_score = NULL, ...)
}
\arguments{
\item{model}{A model object of class \code{xgboost} or \code{xgb.Booster} from \pkg{xgboost}, or class \code{lgb.Booster} from \pkg{lightgbm}}

\item{max_depth}{Maximum depth of trees, extracted from \code{model} by default.}

\item{base_score}{Base score for predictions, extracted from \code{model} by default.}

\item{...}{Additional arguments, for future use}
}
\value{
A class of \code{qshap_tree_explainer} object containing the model information and
  preprocessed tree structures for fast Shapley value computation
}
\description{
Creates an explainer object for computing feature-specific Shapley values
from a trained tree ensemble model. Supports XGBoost, LightGBM, and
CatBoost models.
}
\examples{
library(xgboost)
set.seed(42)
n <- 100
p <- 100
X <- matrix(rnorm(n * p), nrow = n, ncol = p)
y <- X[, 1] - X[, 2] + rnorm(n, sd = 0.2)
model <- xgboost(X, y, nrounds = 15, max_depth = 2, verbose = 0)
explainer <- gazer(model)

}
