LINEAR_RIDGE

The LINEAR_RIDGE Extension command is available in the SPSS® Statistics Standard Edition.

LINEAR_RIDGE uses the Python sklearn.linear_model.Ridge class to estimate L2 or squared loss regularized linear regression models for a dependent variable on one or more independent variables, and includes optional modes to display trace plots and to select the alpha hyperparameter value based on crossvalidation. When a single model is fitted or crossvalidation is used to select alpha, a partition of holdout data can be used to estimate out-of-sample performance.

LINEAR_RIDGE dependent [BY factor list] [WITH covariate list] 
[/MODE {FIT**     }
       {TRACE     }
       {CROSSVALID}
[/ALPHA VALUES = {1**                                    }
                 {[value(s)] [value1 TO value2 BY value3]}]
        METRIC = {LINEAR**}
                 {LG10    }
[/CRITERIA INTERCEPT = {TRUE**} STANDARDIZE = {TRUE**} TIMER = {5**  } 
                       {FALSE }               {FALSE}          {value}       
              NFOLDS = {5    } STATE = {0    }
                       {value}         {value}
          TRACETABLE = {0**    }
                       {integer}
[/PARTITION {TRAINING = {70**   } HOLDOUT = {30**   }}]
                        {integer}           {integer}
            {VARIABLE = varname}
[/PRINT {BEST** }
        {COMPARE} 
        {VERBOSE}]
[/PLOT {MSE} {R2} {OBSERVED} {RESIDUAL}]
[/SAVE {PRED(varname)} {RESID(varname)}]

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the "Command Order" topic for more information.

Syntax for the LINEAR_RIDGE extension command can be generated from the Linear Ridge Regression dialog box.

Release History

Release 29.0
  • Command introduced