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

Module: tfdf

User entry point for the TensorFlow Decision Forest API.

Basic usage:

# Imports
import tensorflow_decision_forests as tfdf
import pandas as pd
from wurlitzer import sys_pipes

# Load a dataset into a Pandas Dataframe.
dataset_df = pd.read_csv("/tmp/penguins.csv")

# Display the first 3 examples.

# Convert the Pandas dataframe to a tf dataset
tf_dataset = tfdf.keras.pd_dataframe_to_tf_dataset(dataset_df,label="species")

model = tfdf.keras.RandomForestModel()
with sys_pipes():
# Note: The `sys_pipes` part is to display logs during training.

# Evaluate model.

# Save model.


builder module: Model builder.

inspector module: Model inspector.

keras module: Decision Forest in a Keras Model.

model_plotter module: Plotting of decision forest models.

py_tree module: Decision trees stored as python objects.

version '0.1.6'