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.
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.
- data: Specifies the dataset (teradataml DataFrame) on which prediction and performance metrics needs to be generated using model rank in leaderboard.
When this argument is not specified, default test data is used. Default test data is the dataset generated at the time of training.
- rank: Specifies the rank of the model in the leaderboard to be used for prediction.
Default value is 1.
This function returns pandas DataFrame with prediction.