Training Set

class databricks.ml_features.training_set.TrainingSet(feature_spec: databricks.ml_features_common.entities.feature_spec.FeatureSpec, df: pyspark.sql.dataframe.DataFrame, labels: List[str], feature_table_metadata_map: Dict[str, databricks.ml_features.entities.feature_table.FeatureTable], feature_table_data_map: Dict[str, pyspark.sql.dataframe.DataFrame], uc_function_infos: Dict[str, databricks.ml_features._information_schema_spark_client._information_schema_spark_client.FunctionInfo], use_spark_native_join: Optional[bool] = False)

Bases: object

Note

Aliases: databricks.feature_engineering.training_set.TrainingSet, databricks.feature_store.training_set.TrainingSet

Class that defines TrainingSet objects.

Note

The TrainingSet constructor should not be called directly. Instead, call create_training_set().

load_df() → pyspark.sql.dataframe.DataFrame

Load a DataFrame.

Return a DataFrame for training.

The returned DataFrame has columns specified in the feature_spec and labels parameters provided in create_training_set().

Returns:A DataFrame for training