/** * Copyright by XGBoost Contributors 2017-2022 */ #include "xgboost/tree_model.h" // RegTree namespace xgboost { /** * \brief calculate the feature contributions (https://arxiv.org/abs/1706.06060) for the tree * \param feat dense feature vector, if the feature is missing the field is set to NaN * \param out_contribs output vector to hold the contributions * \param condition fix one feature to either off (-1) on (1) or not fixed (0 default) * \param condition_feature the index of the feature to fix */ void CalculateContributions(RegTree const &tree, const RegTree::FVec &feat, std::vector *mean_values, bst_float *out_contribs, int condition, unsigned condition_feature); } // namespace xgboost