function temp = templateGAM(varargin)
%TEMPLATEGAM Create a Generalized Additive Model (GAM) template.
%   T=TEMPLATEGAM() returns a Generalized Additive Model (GAM) template.
%
%   T=TEMPLATEGAM('PARAM1',val1,'PARAM2',val2,...) specifies optional
%   parameter name/value pairs:
%
%       'InitialLearnRateForPredictors' - Learning rate for boosting predictor
%                        trees. Scalar value between 0 and 1. Default: 1
%       'InitialLearnRateForInteractions' - Learning rate for boosting
%                        interaction trees. Scalar value between 0 and 1.
%                        Default: 1
%       'Interactions' - Interactions to include while training. Specify as one
%                        of:
%                          * A string:
%                            - 'all' : P*(P-1)/2 interactions for P predictors.
%                          * A scalar integer: Number of interactions.
%                          * Logical term matrix specifying interaction pairs.
%                             A T X P logical matrix with each row identifying
%                             the pair where T is the number of interaction terms,
%                             and P is the number of predictors.
%                        Default: 0
%       'MaxPValue'    - Threshold p-value for detection of interaction pairs.
%                        Scalar value between 0 and 1.
%                        Default: 1 (all interactions are used)
%       'MaxNumSplitsPerPredictor' - Maximal number of splits per predictor.
%                        A positive integer scalar applied to all predictors.
%                        Default: 1
%       'MaxNumSplitsPerInteraction' - Maximal Number of splits per interaction
%                        pair. A positive integer scalar applied to all interactions.
%                        Default: 4
%       'NumPrint'     - Nonnegative integer scalar. Diagnostic messages are
%                        displayed during training of GAM every
%                        'NumPrint' iterations. This parameter is used
%                        only if 'Verbose' value is 1. Default: 10
%       'NumTreesPerPredictor' - Number of trees trained per predictor.
%                        A positive integer scalar applied to all predictors.
%                        Default: 300
%       'NumTreesPerInteraction' - Number of trees trained per interaction pair.
%                        A positive integer scalar applied to all interactions.
%                        Default: 100
%       'Verbose'      - Verbosity level, one of:
%                         0  (Default) Does not display any diagnostic messages.
%                         1  Displays diagnostic messages every 'NumPrint' iterations.
%                         2  Displays more diagnostic messages.
%       'Type'         - String specifying the type of linear model template.
%                        Specify as one of 'classification' or 'regression'.
%                        Default = []
%
%   See also ClassificationGAM, RegressionGAM, fitcgam, fitrgam.

%   Copyright 2023 The MathWorks, Inc.

if nargin > 0
    [varargin{:}] = convertStringsToChars(varargin{:});
end

temp = classreg.learning.FitTemplate.make('GAM',varargin{:});
end

% LocalWords:  PValue
