Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - predict - 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
17.20
Publication Date
November 2022
Content Type
Programming Reference
Publication ID
B700-4500-112K
ft:locale
en-US
ft:lastEdition
2024-02-21
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_1720
Product Category
Teradata Vantage
teradataml.hyperparameter_tuner.optimizer.GridSearch.predict = predict(self, **kwargs)
DESCRIPTION:
    Function uses model training function generated models from SQLE, 
    VAL and UAF features for predictions. Predictions are made using 
    the best trained model. Predict function is not supported for
    non-model trainer function.
 
PARAMETERS:
    kwargs:
        Optional Argument.
        Specifies the keyword arguments. Accepts all merge model 
        predict feature arguments required for the teradataml 
        analytic function predictions.
 
RETURNS:
    Output teradataml DataFrames can be accessed using attribute
    references, such as HPTObj.<attribute_name>.
    Output teradataml DataFrame attribute name is:
        result
 
RAISES:
    TeradataMlException, TypeError, ValueError
 
EXAMPLES:
    >>> # Create an instance of the search algorithm called "optimizer_obj" 
    >>> # by referring "__init__()" method.
    >>> # Perform "fit()" method on the optimizer_obj to populate model records.
    >>> # Perform prediction using "optimizer_obj".
    >>> optimizer_obj.predict(newdata=test_data, **eval_params)
             id  prediction  MedHouseVal
        0   686    0.202843        1.578
        1  2018    0.149868        0.578
        2  1754    0.211870        1.651
        3   670    0.192414        1.922
        4   244    0.247545        1.117