RECENGINE Procedure

AUTOTUNE Statement

  • AUTOTUNE <options>;

The AUTOTUNE statement searches for the best combination of some option values in PROC RECENGINE.

Table 2 summarizes the options that you can specify in the AUTOTUNE statement. For more information about all options except the AGGREGATIONMETHOD=, ITEMFILTER, TOPN=, and TUNINGPARAMETERS= options, see the option’s description in the section AUTOTUNE Statement in Chapter 2, Shared Concepts. These four options are described following Table 2. Note that the hyperparameter that you specify in the TUNINGPARAMETERS= option for tuning must be related to the METHOD= option value that you specify in the PROC RECENGINE statement.

Table 2: AUTOTUNE Statement Options

Option Description
AGGREGATIONMETHOD= Specifies the type of aggregation to apply in pooling similarity scores of nearest neighbors
APPENDLOOKUP Specifies that the table specified in the HISTORYTABLE= option contain the rows from the table specified in the LOOKUPTABLE= option
CONSTRAINTS= Specifies the constraints on the output metrics
EVALHISTORY= Specifies how to report the evaluation history of the tuner
FOLDCOLUMN= Specifies the column in the data table in which the cross validation fold value is indicated
FRACTION= Specifies the fraction of observations to use for validation
HISTORYTABLE= Specifies the CAS table that contains the evaluation history
KFOLD= Specifies the number of folds for k-fold cross validation
ITEMFILTER Specifies that only items that the user has not previously observed be recommended during the tuning process
LIVEUPDATE Specifies that the table specified in the HISTORYTABLE= option be updated at every evaluation
LOOKUPTABLE= Specifies the CAS table to use for evaluation lookup
MAXBAYES= Specifies the maximum number of points in the kriging model
MAXEVALS= Specifies the maximum number of evaluations
MAXITER= Specifies the maximum number of iterations when SEARCHMETHOD=GA or SEARCHMETHOD=BAYESIAN
MAXTIME= Specifies the maximum time for all iterations
MAXTRAINTIME= Specifies the maximum time for a model training
NCONVITER= Specifies the number of convergence iterations
NOGRIDSHUFFLE Requests that the grid points not be shuffled
NOLOCALSEARCH Disables local search optimization
NPARALLEL= Specifies the number of parallel sessions
NSUBSESSIONWORKERS= Specifies the number of workers in parallel sessions
OBJECTIVE= Specifies the objective function
POPSIZE= Specifies the population size when SEARCHMETHOD=GA or SEARCHMETHOD=BAYESIAN
SAMPLESIZE= Specifies the sample size when SEARCHMETHOD=LHS or SEARCHMETHOD=RANDOM
SEARCHMETHOD= Specifies the search method that the optimizer uses
SECONDOBJECTIVE= Specifies the second objective to use for tuning
SELECTINITPOINT Specifies that the tuner select the best evaluation from the lookup table
TARGETEVENT= Specifies the target event for ROC-based calculations
TOPN= Specifies the number of items to be recommended to each user in the scoring input data during the tuning process
TRAINFRACTION= Specifies the fraction of observations to use for training
TUNINGPARAMETERS= Specifies the custom tuning parameters
USEPARAMETERS= Specifies how to handle the TUNINGPARAMETERS= option


AGGREGATIONMETHOD=0 | 1 | 2 | 3

specifies the type of aggregation to apply in pooling similarity scores of nearest neighbors when METHOD=KNN. You can specify the following values:

0

sums scores for repeated nearest neighbors.

1

averages scores for repeated nearest neighbors.

2

sums scores for repeated nearest neighbors with mean adjustment.

3

sums scores for repeated nearest neighbors with Z-score adjustment.

By default, AGGREGATIONMETHOD=0.

ITEMFILTER

specifies that only items that the user has not previously observed be recommended during the tuning process.

TOPN=number

specifies the number of items to be recommended to each user in the scoring input data during the tuning process.

By default, TOPN=50.

TUNINGPARAMETERS=(suboption ||<suboption>)
TUNEPARMS=(suboption ||<suboption>)

specifies which parameters to tune and which ranges to tune over. If USEPARAMETERS=STANDARD, this option is ignored.

You can specify one or more of the following suboptions:

DISTANCEMETRIC (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the distance metric to be used during a KNN search in the tuning process. This option is relevant only when METHOD=KNN.

By default, DISTANCEMETRIC=COSINE.

FEEDBACKCONFIDENCESLOPE (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the slope that converts confidence to weight. This option is relevant only when METHOD=DTOS.

You can specify the following additional suboptions:

LB=number

specifies the minimum value for the slope that converts confidence to weight to use in the tuning process. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, LB=0.

UB=number

specifies the maximum value for the slope that converts confidence to weight to use in the tuning process. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, UB=100.

VALUES=value-list

specifies a list of values for the slope that converts confidence to weight to use in the tuning process, where value-list is a space-separated list. If you specify this suboption, you cannot specify either the LB= or UB= suboption.

INIT=number

specifies the initial value for the slope that converts confidence to weight to use in the tuning process.

By default, INIT=50.

EXCLUDE

excludes the slope that converts confidence to weight from the tuning process. If you specify this suboption, any specified LB=, UB=, VALUES=, and INIT= suboptions are ignored.

K (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the number of neighbors in a KNN search. This option is relevant only when METHOD=KNN.

You can specify the following additional suboptions:

LB=number

specifies the minimum number of neighbors in a KNN search to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, LB=1.

UB=number

specifies the maximum number of neighbors in a KNN search to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, UB=30.

VALUES=value-list

specifies a list of values for the number of neighbors in a KNN search to use in the tuning process, where value-list is a space-separated list of nonnegative integer values. If you specify this suboption, you cannot specify either the LB= or UB= suboption.

INIT=number

specifies the initial value for the number of neighbors in a KNN search to use in the tuning process.

By default, INIT=5.

EXCLUDE

excludes the number of neighbors in a KNN search from the tuning process. If you specify this suboption, any specified LB=, UB=, VALUES=, and INIT= suboptions are ignored.

LEARNSTEP (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the learning step size for the stochastic gradient descent (SGD) algorithm. This option is relevant only when METHOD=BPR.

You can specify the following additional suboptions:

LB=number

specifies the minimum learning step size to use in the tuning process,. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, LB=0.001.

UB=number

specifies the maximum learning step size to use in the tuning process. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, UB=0.5.

VALUES=value-list

specifies a list of learning step size values to use in the tuning process, where value-list is a space-separated list. If you specify this suboption, you cannot specify either the LB= or UB= suboption.

INIT=number

specifies the initial learning step size to use in the tuning process.

By default, INIT=0.1.

EXCLUDE

excludes the learning step size from the tuning process. If you specify this suboption, any specified LB=, UB=, VALUES=, and INIT= suboptions are ignored.

MAXITER (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the maximum number of iterations for the algorithm to perform. This option is relevant only when METHOD=BPR or METHOD=DTOS.

You can specify the following additional suboptions:

LB=number

specifies the minimum number of iterations to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, LB=10 when METHOD=BPR and LB=1 when METHOD=DTOS.

UB=number

specifies the maximum number of iterations to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, UB=100 when METHOD=BPR and UB=1000 when METHOD=DTOS.

VALUES=value-list

specifies a list of maximum iterations to use in the tuning process, where value-list is a space-separated list of nonnegative integers. If you specify this suboption, you cannot specify either the LB= or UB= suboption.

INIT=number

specifies the initial maximum iterations in the tuning process.

By default, INIT=20 when METHOD=BPR and INIT=10 when METHOD=DTOS.

EXCLUDE

excludes the maximum iterations from the tuning process. If you specify this suboption, any specified LB=, UB=, VALUES=, and INIT= suboptions are ignored.

MINIBATCHSIZE (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the number of observation samples to be used in each step of the stochastic gradient descent (SGD) algorithm. This option is relevant only when METHOD=BPR.

You can specify the following additional suboptions:

LB=number

specifies the minimum minibatch size to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, LB=1.

UB=number

specifies the maximum minibatch size to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, UB=100.

VALUES=value-list

specifies a list of minibatch size values to use in the tuning process, where value-list is a space-separated list. If you specify this suboption, you cannot specify either the LB= or UB= suboption.

INIT=number

specifies the initial minibatch size to use in the tuning process.

By default, INIT=1.

EXCLUDE

excludes the minibatch size from the tuning process. If you specify this suboption, any specified LB=, UB=, VALUES=, and INIT= suboptions are ignored.

MINNORMOBJCHANGE (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the minimum normalized objective change over two consecutive training iterations that is required in order to stop training before the maximum number of iterations. This option is relevant only when METHOD=DTOS.

You can specify the following additional suboptions:

LB=number

specifies the minimum value for the minimum normalized objective change parameter to use in the tuning process. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, LB=0.0.

UB=number

specifies the maximum value for the minimum normalized objective change to use in the tuning process. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, UB=1.0.

VALUES=value-list

specifies a list of values for the minimum normalized objective change parameter to use in the tuning process, where value-list is a space-separated list. If you specify this suboption, you cannot specify either the LB= or UB= suboption.

INIT=number

specifies the initial value for the minimum normalized objective change parameter to use in the tuning process.

By default, INIT=0.01.

EXCLUDE

excludes the minimum normalized objective change parameter from the tuning process. If you specify this suboption, any specified LB=, UB=, VALUES=, and INIT= suboptions are ignored.

NFACTORS (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the number of latent factors to be estimated. This option is relevant only when METHOD=BPR or METHOD=DTOS.

You can specify the following additional suboptions:

LB=number

specifies the minimum number of latent factors to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, LB=5 when METHOD=BPR and LB=1 when METHOD=DTOS.

UB=number

specifies the maximum number of latent factors to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, UB=30 when METHOD=BPR and UB=50 when METHOD=DTOS.

VALUES=value-list

specifies a list of number of latent factors to use in the tuning process, where value-list is a space-separated list of nonnegative integers. If you specify this suboption, you cannot specify either the LB= or UB= suboption.

INIT=number

specifies the initial number of latent factors to use in the tuning process.

By default, INIT=10 when METHOD=BPR and INIT=1 when METHOD=DTOS.

EXCLUDE

excludes the number of latent factors from the tuning process. If you specify this suboption, any specified LB=, UB=, VALUES=, and INIT= suboptions are ignored.

NFEATFACTORS (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the number of latent factors for each nominal feature of users or items to be estimated. This option is relevant only when METHOD=DTOS and when the NODENSIFYNOMFEAT option is omitted.

You can specify the following additional suboptions:

LB=number

specifies the minimum number of latent factors for each nominal feature of users or items to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, LB=1.

UB=number

specifies the maximum number of latent factors for each nominal feature of users or items to use in the tuning process, where number is a nonnegative integer. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, UB=50.

VALUES=value-list

specifies a list of number of latent factors for each nominal feature of users or items to use in the tuning process, where value-list is a space-separated list of nonnegative integers. If you specify this suboption, you cannot specify either the LB= or UB= suboption.

INIT=number

specifies the initial number of latent factors for each nominal feature of users or items to use in the tuning process.

By default, INIT=3.

EXCLUDE

excludes the number of latent factors for each nominal feature of users or items from the tuning process. If you specify this suboption, any specified LB=, UB=, VALUES=, and INIT= suboptions are ignored.

NODENSIFYNOMFEAT

specifies that the nominal features are represented by sparse one-hot vectors in the tuning process. This option is relevant only when METHOD=DTOS.

NOITEMBIAS

specifies that the model not include item bias in the tuning process. This option is relevant only when METHOD=DTOS.

By default, this option is off.

NOUSERBIAS

specifies that the model not include user bias in the tuning process. This option is relevant only when METHOD=DTOS.

By default, this option is off.

REGULARIZATION (LB=number UB=number VALUES=value-list INIT=number EXCLUDE)

specifies the regularization parameter. This option is relevant only when METHOD=BPR or METHOD=DTOS.

You can specify the following additional suboptions:

LB=number

specifies the minimum value for the regularization parameter to use in the tuning process. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, LB=0.001.

UB=number

specifies the maximum value for the regularization parameter to use in the tuning process. If you specify this suboption, you cannot specify the VALUES= suboption.

By default, UB=0.5 when METHOD=BPR and UB=1000 when METHOD=DTOS.

VALUES=value-list

specifies a list of regularization values to use in the tuning process, where value-list is a space-separated list of nonnegative integers. If you specify this suboption, you cannot specify either the LB= or UB= suboption.

INIT=number

specifies the initial value for the regularization parameter to use in the tuning process.

By default, INIT=0.1 when METHOD=BPR and INIT=0.01 when METHOD=DTOS.

EXCLUDE

excludes the regularization parameter from the tuning process. If you specify this suboption, any specified LB=, UB=, VALUES=, and INIT= suboptions are ignored.

Last updated: August 06, 2026