Random-Forest

Code PRACTICE

Usage example

In the previous lesson, we trained a CART decision tree on a small dataset by calling tfdf.keras.CartModel. To train a random forest model, simply replace tfdf.keras.CartModel with tfdf.keras.RandomForestModel:

model = tfdf.keras.RandomForestModel()

model.fit(tf_train_dataset)