Teradata Package for Python Function Reference - response_columns - 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

Product
Teradata Package for Python
Release Number
17.00
Published
November 2021
Language
English (United States)
Last Update
2021-11-19
lifecycle
previous
Product Category
Teradata Vantage
teradataml.common.formula.Formula.response_column
DESCRIPTION:
    Property to get the response column used in formula.
 
PARAMETERS:
    None.
 
RETURNS:
    Returns response column.
 
RAISES:
    None.
 
EXAMPLES:
    # Load the data to run the example
    load_example_data("decisionforest", ["housing_train"])
 
    # Create teradataml DataFrame.
    housing_train = DataFrame.from_table("housing_train")
 
    # Example 1 -
    decision_forest_out1 = DecisionForest(formula = "homestyle ~ bedrooms + lotsize + gashw + driveway + stories + recroom + price + garagepl + bathrms + fullbase + airco + prefarea",
                                          data = housing_train,
                                          tree_type = "classification",
                                          ntree = 50,
                                          nodesize = 1,
                                          variance = 0.0,
                                          max_depth = 12,
                                          mtry = 3,
                                          mtry_seed = 100,
                                          seed = 100)
 
    # Print response column used in formula.
    decision_forest_out1.formula.response_column