# doc-cache created by Octave 11.3.0
# name: cache
# type: cell
# rows: 3
# columns: 1
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
RegressionGAM


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6630
 -- statistics: OBJ = RegressionGAM (X, Y)
 -- statistics: OBJ = RegressionGAM (..., NAME, VALUE)

     Create a RegressionGAM class object containing a Generalized Additive Model
     (GAM) for regression.

     A RegressionGAM class object can store the predictors and response data
     along with various parameters for the GAM model.  It is recommended to use
     the ‘fitrgam’ function to create a RegressionGAM object.

     ‘OBJ = RegressionGAM (X, Y)’ returns an object of class RegressionGAM, with
     matrix X containing the predictor data and vector Y containing the
     continuous response data.

        • X must be a NxP numeric matrix of input data where rows correspond to
          observations and columns correspond to features or variables.  X will
          be used to train the GAM model.
        • Y must be Nx1 numeric vector containing the response data
          corresponding to the predictor data in X.  Y must have same number of
          rows as X.

     ‘OBJ = RegressionGAM (..., NAME, VALUE)’ returns an object of class
     RegressionGAM with additional properties specified by Name-Value pair
     arguments listed below.

          NAME             VALUE
                           
     -----------------------------------------------------------------------------------
          "predictors"     Predictor Variable names, specified as a row vector cell
                           of strings with the same length as the columns in X.  If
                           omitted, the program will generate default variable names
                           (x1, x2, ..., xn) for each column in X.
                           
          "responsename"   Response Variable Name, specified as a string.  If
                           omitted, the default value is "Y".
                           
          "formula"        a model specification given as a string in the form "Y ~
                           terms" where Y represents the response variable and terms
                           the predictor variables.  The formula can be used to
                           specify a subset of variables for training model.  For
                           example: "Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3" specifies
                           four linear terms for the first four columns of for
                           predictor data, and x1:x2 and x2:x3 specify the two
                           interaction terms for 1st-2nd and 3rd-4th columns
                           respectively.  Only these terms will be used for training
                           the model, but X must have at least as many columns as
                           referenced in the formula.  If Predictor Variable names
                           have been defined, then the terms in the formula must
                           reference to those.  When "formula" is specified, all
                           terms used for training the model are referenced in the
                           IntMatrix field of the OBJ class object as a matrix
                           containing the column indexes for each term including both
                           the predictors and the interactions used.
                           
          "interactions"   a logical matrix, a positive integer scalar, or the string
                           "all" for defining the interactions between predictor
                           variables.  When given a logical matrix, it must have the
                           same number of columns as X and each row corresponds to a
                           different interaction term combining the predictors
                           indexed as true.  Each interaction term is appended as a
                           column vector after the available predictor column in X.
                           When "all" is defined, then all possible combinations of
                           interactions are appended in X before training.  At the
                           moment, parsing a positive integer has the same effect as
                           the "all" option.  When "interactions" is specified, only
                           the interaction terms appended to X are referenced in the
                           IntMatrix field of the OBJ class object.
                           
          "knots"          a scalar or a row vector with the same columns as X.  It
                           defines the knots for fitting a polynomial when training
                           the GAM. As a scalar, it is expanded to a row vector.  The
                           default value is 5, hence expanded to ones (1, columns
                           (X)) * 5.  You can parse a row vector with different
                           number of knots for each predictor variable to be fitted
                           with, although not recommended.
                           
          "order"          a scalar or a row vector with the same columns as X.  It
                           defines the order of the polynomial when training the GAM.
                           As a scalar, it is expanded to a row vector.  The default
                           values is 3, hence expanded to ones (1, columns (X)) * 3.
                           You can parse a row vector with different number of
                           polynomial order for each predictor variable to be fitted
                           with, although not recommended.
                           
          "dof"            a scalar or a row vector with the same columns as X.  It
                           defines the degrees of freedom for fitting a polynomial
                           when training the GAM. As a scalar, it is expanded to a
                           row vector.  The default value is 8, hence expanded to
                           ones (1, columns (X)) * 8.  You can parse a row vector
                           with different degrees of freedom for each predictor
                           variable to be fitted with, although not recommended.
                           
          "tol"            a positive scalar to set the tolerance for convergence
                           during training.  By default, it is set to 1e-3.

     You can parse either a "formula" or an "interactions" optional parameter.
     Parsing both parameters will result an error.  Accordingly, you can only
     pass up to two parameters among "knots", "order", and "dof" to define the
     required polynomial for training the GAM model.

     See also: fitrgam, regress, regress_gp.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Create a RegressionGAM class object containing a Generalized Additive Model
(...





