Help protect the Great Barrier Reef with TensorFlow on Kaggle Join Challenge

Module: tfdf.keras.core

Core wrapper.

This file contains the Keras model wrapper around an Yggdrasil model/learner. While it can be used directly, the helper functions in keras.py / wrapper_pre_generated.py should be preferred as they explicit more directly the learner specific hyper-parameters.

Usage example:

# Indirect usage
import tensorflow_decision_forests as tfdf

model = tfdf.keras.RandomForestModel()
train_ds = tfdf.keras.pd_dataframe_to_tf_dataset(...)
model.fit(train_ds)

# Direct usage
import tensorflow_decision_forests as tfdf

model = tfdf.keras.CoreModel(learner="RANDOM_FOREST")
train_ds = tfdf.keras.pd_dataframe_to_tf_dataset(...)
model.fit(train_ds)

See "CoreModel" for more details

Classes

class AdvancedArguments: Advanced control of the model that most users won't need to use.

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

class FeatureSemantic: Semantic (e.g.

class FeatureUsage: Semantic and hyper-parameters for a single feature.

class HyperParameterTemplate: Named and versionned set of hyper-parameters.

class YggdrasilDeploymentConfig: A ProtocolMessage

class YggdrasilTrainingConfig: A ProtocolMessage

class datetime: datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])

class partial: partial(func, *args, **keywords) - new function with partial application

class timedelta: Difference between two datetime values.

Functions

contextmanager(...): @contextmanager decorator.

get_worker_idx_and_num_workers(...): Gets the current worker index and the total number of workers.

pd_dataframe_to_tf_dataset(...): Converts a Panda Dataframe into a TF Dataset compatible with Keras.

yggdrasil_model_to_keras_model(...): Converts an Yggdrasil model into a Keras model.

Type Aliases

HyperParameters

ONLY_WARN_ON_DATASET_CONFIGURATION_ISSUES True
Task Instance of google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper
TaskType 'abstract_model_pb2.Task'