Use the deploy() function to save models to the specified table.
If 'ranks' is provided, specified models in 'ranks' will be saved and ranks will be reassigned to specified models based on the order of the leaderboard, non-specified models will be ignored.
Raises TeradataMlException.
Required argument:
- table_name specifies the table name to which the models information is to be saved.
Types: int
Optional arguments:
- top_n specifies the top n models to be saved.If ranks is not provided, the function saves the top 'top_n' models.
Default value: 3
Types: int
- ranks specifies the ranks for the models to be saved.If ranks is provided, then top_n is ignored.
Types: int or list of int or range object.
Example 1: Create an instance of the AutoML called "obj" by referring "AutoML() or AutoRegressor() or AutoClassifier()" method
>>> obj = AutoML(task_type="Classification") >>> obj.fit(data = data, target_column = target_column)
Example 2: Save top 3 models to the specified table
>>> obj.deploy("model_table")
Example 3: Save top n models to the specified table
>>> obj.deploy("model_table", top_n=5)
Example 4: Save models based on specified ranks to the specified table
>>> obj.deploy("model_table", ranks=[1, 3, 5])
Example 5: Save models based on specified rank range to the specified table
>>> obj.deploy("model_table", ranks=range(2,6))