Have a question? Connect with the community at the TensorFlow Forum Visit Forum

Module: tfdf.model_plotter

Plotting of decision forest models.

Standalone usage:

import tensorflow_decision_forests as tfdf model = tfdf.keras.CartModel(). model.fit(...)

with open("plot.html", "w") as f: f.write(tfdf.model_plotter.plot_model(model))

Colab usage:

import tensorflow_decision_forests as tfdf model = tfdf.keras.CartModel(). model.fit(...)

tfdf.model_plotter.plot_model_in_colab(model)

Classes

class CoreModel: Keras Model V2 wrapper around an Yggdrasil Learner and Model.

Functions

plot_model(...): Plots the model structure and it correlation with a dataset.

plot_model_in_colab(...): Plots a model structure in colab.

plot_tree(...): Plots a decision tree.