dmlc / dmlc/xgboost

[Feature request] Expected output over feature subsets

Open
#6,107 2 comments 0 reactions 0 assignees View on GitHub
feature-request
Dominant language
C++
Stars
28.8k
Forks
8.9k
Avg merge
1d 12h
Merged PRs (30d)
54

Description

This is a feature request for computing the expected output of the model when only a subset of features are present.

We have a use case where we would like to observe the expected output of the model when multiple features are missing at evaluation time. In other word, we would like to compute the expected output over a subset of all features. In a decision tree, this can be done by finding all leaves that correspond to present (non-missing) features, and computing the weighted average of outputs at said leaves. This is similar to the TreeSHAP algorithm, but instead of tracking all possible subsets, we are only interested in particular subsets (e.g., through a binary mask of [nsamples, nfeatures] provided to the predict function). The slower TreeSHAP algorithm includes psuedocode for computing this expectation (see Algorithm 1 in the [paper](https://arxiv.org/pdf/1802.03888.pdf)).

I was wondering if this can be implemented in XGBoost? I think this would be a great feature. Note that this is different than how XGBoost handles missing features during training by choosing the best path for missing values. Instead, this enables handling missing features at evaluation time.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.