Teradata Package for Python Function Reference on VantageCloud Lake - reset_labels - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
20.00.00.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.store.feature_store.models.FeatureGroup.reset_labels = reset_labels(self)
DESCRIPTION:
    Resets the labels for FeatureGroup.
 
PARAMETERS:
    None
 
RETURNS:
    bool
 
RAISES:
    None
 
EXAMPLES:
    >>> from teradataml import DataSource, Entity, Feature, FeatureGroup, load_example_data
    >>> load_example_data("dataframe", "admissions_train")
    >>> # Let's create DataFrame first.
    >>> df = DataFrame("admissions_train")
    >>> # create the features.
    >>> masters_feature = Feature("masters", df.masters)
    >>> gpa_feature = Feature("gpa", df.gpa)
    >>> stats_feature = Feature("stats", df.stats)
    >>> admitted_feature = Feature("admitted", df.admitted)
    >>> # Create Entity.
    >>> entity = Entity("id", df.id)
    >>> # Create DataSource
    >>> data_source = DataSource("admissions_source", df)
    >>> # Create FeatureGroup.
    >>> fg = FeatureGroup('Admissions',
    ...                   features=[masters_feature, gpa_feature, stats_feature, admitted_feature],
    ...                   entity=entity,
    ...                   data_source=data_source)
    >>> # Set feature 'admitted' as label.
    >>> fg.set_labels('admitted')
    True
 
    >>> # Remove the labels from FeatureGroup.
    >>> fg.reset_labels()
    True
    >>>