Lasy decyzyjne TensorFlow
import tensorflow_decision_forests as tfdf import pandas as pd # Load a dataset in a Pandas dataframe. train_df = pd.read_csv("project/train.csv") test_df = pd.read_csv("project/test.csv") # Convert the dataset into a TensorFlow dataset. train_ds = tfdf.keras.pd_dataframe_to_tf_dataset(train_df, label="my_label") test_ds = tfdf.keras.pd_dataframe_to_tf_dataset(test_df, label="my_label") # Train a Random Forest model. model = tfdf.keras.RandomForestModel() model.fit(train_ds) # Summary of the model structure. model.summary() # Evaluate the model. model.evaluate(test_ds) # Export the model to a SavedModel. model.save("project/model")
Lasy decyzyjne TensorFlow ( TF-DF ) to zbiór najnowocześniejszych algorytmów do uczenia, obsługi i interpretacji modeli lasów decyzyjnych . Biblioteka jest zbiorem modeli Keras i obsługuje klasyfikację, regresję i ranking.
TF-DF jest nakładką na biblioteki Yggdrasil Decision Forest C++. Modele wytrenowane za pomocą TF-DF są kompatybilne z modelami Yggdrasil Decision Forests i na odwrót.
Niestety TF-DF nie jest jeszcze dostępny dla komputerów Mac (nr 16) lub Windows (nr 3) , pracujemy nad tym.
Słowa kluczowe: Lasy decyzyjne, TensorFlow, Las losowy, Drzewa wzmocnione gradientem, CART, interpretacja modelu.
Dokumentacja i zasoby
Dostępne są następujące zasoby:
Społeczność
Przyczynianie się
Mile widziane są wkłady do Lasów Decyzyjnych TensorFlow i Lasów Decyzyjnych Yggdrasil. Jeśli chcesz wnieść swój wkład, zapoznaj się z podręcznikiem programisty .