Use the predict() function to generate prediction on either default test data or any other data using model rank in leaderboard and display performance metrics of the specified model.
If test data contains target column, it displays both prediction and performance metrics; otherwise, it displays only prediction.
This function returns pandas DataFrame with prediction.
Required Argument
- data
- Specifies the dataset (teradataml DataFrame) on which prediction needs to be generated using model rank in leaderboard.
Optional Arguments
- rank
- Specifies the rank of the model in the leaderboard to be used for prediction.
Default value is 1.
- use_loaded_models
- Specifies whether to use loaded models from database for prediction or not.
Default value is False
- preserve_columns
- Specifies whether to preserve input data transformed columns in the output prediction. By default, "id_column", "target_column" (if present in input data), prediction and probability columns are present in the output.
Default value: False