_init_ | RandomSearch | Hyperparameter Tuning in teradataml - _init_ - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

RandomSearch algorithm performs random sampling on hyperparameter space to identify optimal hyperparameters. It works for teradataml analytic functions from Analytics Database, BYOM, VAL, and UAF features.

teradataml RandomSearch allows user to perform hyperparameter tuning for all model trainer and non-model trainer functions.
  • When used for model trainer functions:
    • Based on evaluation metrics, search determines best model.
    • All methods and properties can be used.
  • When used for non-model trainer functions:
    • You can choose the best output as you see fit to use this.
    • Only fit method is supported.

teradataml RandomSearch also allows you to use input data as the hyperparameter. This option can be suitable when you want to identify the best models for a set of input data. When you pass set of data as hyperparameter for model trainer function, the search determines the best data along with the best model based on the evaluation metrics.

Required Arguments:

  • func: Specifies a teradataml analytic function from Analytics Database, BYOM, VAL, and UAF.

    Use the display_analytic_functions() function for list of functions.

  • params: Specifies the parameters of a teradataml analytic function.
    The parameters must be in dictionary type:
    • Keys refer to the argument names;
    • Values refer to argument values for corresponding arguments.
    • You can specify the argument value in a tuple to run hyperparameter tunning with different arguments.
    • Model trainer function arguments id_column, input_columns, and target_columns must be passed in fit() method.
    • All required arguments of non-model trainer function must be passed during RandomSearch object creation.
Optional Arguments:
  • n_iter: Specifies the number of iterations random search need to be performed.

    Default value is 10.

    The value of this argument must be less than the size of parameter populations.