model_unified.object {treeshap} | R Documentation |
Unified model representation
Description
model_unified
object produced by *.unify
or unify
function.
Value
List consisting of two elements:
model - A data.frame
representing model with following columns:
Tree |
0-indexed ID of a tree |
Node |
0-indexed ID of a node in a tree. In a tree the root always has ID 0 |
Feature |
In case of an internal node - name of a feature to split on. Otherwise - NA |
Decision.type |
A factor with two levels: "<" and "<=". In case of an internal node - predicate used for splitting observations. Otherwise - NA |
Split |
For internal nodes threshold used for splitting observations. All observations that satisfy the predicate Decision.type(Split) ('< Split' / '<= Split') are proceeded to the node marked as 'Yes'. Otherwise to the 'No' node. For leaves - NA |
Yes |
Index of a row containing a child Node. Thanks to explicit indicating the row it is much faster to move between nodes |
No |
Index of a row containing a child Node |
Missing |
Index of a row containing a child Node where are proceeded all observations with no value of the dividing feature |
Prediction |
For leaves: Value of prediction in the leaf. For internal nodes: NA |
Cover |
Number of observations seen by the internal node or collected by the leaf for the reference dataset |
data - Dataset used as a reference for calculating SHAP values. A dataset passed to the *.unify
, unify
or set_reference_dataset
function with data
argument. A data.frame
.
Object has two also attributes set:
model |
A string. By what package the model was produced. |
missing_support |
A boolean. Whether the model allows missing values to be present in explained dataset. |