compileml.compile

max_depth

def max_depth(model_int: dict) -> int

from compileml.compile import max_depth

Actual maximum tree depth, measured from the node arrays.

Parameters#

NameTypeDefaultKind
model_intdictrequiredpositional

Returns#

int

Example#

python
from compileml.compile import max_depth
 
assert max_depth(model) <= 2 # exact pairwise attribution