ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

Module: tfdf.inspector

Model inspector.

Utility to access the structure and meta-data (e.g. variable importance, training logs) of a model.

Usage:

model = keras.RandomForest().
model.fit(...)
inspector = model.make_inspector()

# Or
inspector = make_inspector(<model directory>)

print(inspector.name())
print(inspector.num_trees())
# Note: "inspector"'s accessors depends on the model type (inspector.name()).

Classes

class AbstractInspector: Abstract inspector for all Yggdrasil models.

class Evaluation: Evaluation of a model.

class IterNodeResult: Value returned by node iterator methods. See "iterate_on_nodes".

class SimpleColumnSpec: Simplified representation of a column spec.

class TrainLog: One entry in the training logs of a model.

Functions

make_inspector(...): Creates an inspector for a model saved in a directory.

ColumnType Instance of google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper
FILENAME_DATASPEC 'data_spec.pb'
FILENAME_DONE 'done'
FILENAME_HEADER 'header.pb'
FILENAME_NODES_SHARD 'nodes'
MODEL_INSPECTORS

{
 'GRADIENT_BOOSTED_TREES': <class 'tensorflow_decision_forests.component.inspector.inspector._GradientBoostedTreeInspector'>,
 'RANDOM_FOREST': <class 'tensorflow_decision_forests.component.inspector.inspector._RandomForestInspector'>
}

Task Instance of google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper