Teradata Package for Python Function Reference on VantageCloud Lake - model_hyperparameters - 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.08
- Published
- November 2025
- ft:locale
- en-US
- ft:lastEdition
- 2025-12-05
- dita:id
- TeradataPython_FxRef_Lake_2000
- Product Category
- Teradata Vantage
- teradataml.automl.AutoClassifier.model_hyperparameters = model_hyperparameters(self, rank=1, use_loaded_models=False)
- DESCRIPTION:
Get hyperparameters of the model based on rank in leaderboard.
Note:
* If both the fit() and load() methods are invoked before calling model_hyperparameters(),
by default hyperparameters are retrieved from the fit leaderboard.
To retrieve hyperparameters from the loaded models, set "use_loaded_models" to True in the model_hyperparameters call.
PARAMETERS:
rank:
Required Argument.
Specifies the rank of the model in the leaderboard.
Default Value: 1
Types: int
use_loaded_models:
Optional Argument.
Specifies whether to use loaded models from database to get hyperparameters or not.
Default Value: False
Types: bool
RETURNS:
Dictionary, containing hyperparameters.
RAISES:
TeradataMlException.
EXAMPLES:
# Example 1: Get hyperparameters of the model using fit models.
# Create an instance of the AutoML called "automl_obj" by referring
# "AutoML()" or "AutoRegressor()" or "AutoClassifier()" or
# "AutoFraud()" or "AutoChurn()" or "AutoCluster()" method.
# Perform fit() operation on the "automl_obj".
# Get hyperparameters of the model using model_hyperparameters() method on "automl_obj".
>>> automl_obj = AutoML(task_type="Classification")
>>> automl_obj.fit(admissions_train, "admitted")
>>> automl_obj.model_hyperparameters(rank=1)
# Example 2: Get hyperparameters of the model using loaded models.
# Create an instance of the AutoML called "automl_obj" by referring
# "AutoML()" or "AutoRegressor()" or "AutoClassifier()" or
# "AutoFraud()" or "AutoChurn()" or "AutoCluster()" method.
# Load models from the specified table.
# Get hyperparameters of the model using model_hyperparameters() method on "automl_obj".
>>> automl_obj = AutoML()
>>> automl_obj.load("model_table")
>>> automl_obj.model_hyperparameters(rank=1)
# Example 3: Get hyperparameters of the model when both fit and load method are called.
# Create an instance of the AutoML called "automl_obj" by referring
# "AutoML()" or "AutoRegressor()" or "AutoClassifier()" or
# "AutoFraud()" or "AutoChurn()" or "AutoCluster()" method.
# Fit the data.
# Load models from the specified table.
# Get hyperparameters of the model using model_hyperparameters() method on "automl_obj".
>>> automl_obj = AutoML(task_type="Classification")
>>> automl_obj.fit(admissions_train, "admitted")
>>> automl_obj.load("model_table")
# Get hyperparameters of the model using loaded models.
>>> automl_obj.model_hyperparameters(rank=1, use_loaded_models=True)
# Get hyperparameters of the model using fit models.
>>> automl_obj.model_hyperparameters(rank=1)