Repository navigation
v0.2.5
This release adds the method parameter to the predict_contributions metric. This allows either "average" (the method xgboost uses to calculate the contribution matrix when approx_contribs is True), or "weight" to be specified. The "average" method averages the leaf weights across all nodes, and then uses this for calculating the contributions. The "weight" method instead uses the internal leaf weights, to determine how a feature impacts the final score. Both methods result in a contribution matrix, that if summed by each row, is equivalent to the output of the predict method.