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 DisplayOptions: Display options.

Functions

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

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

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