R: This function creates a penalty object

mxPenalty {OpenMx} | R Documentation

## This function creates a penalty object

### Description

This function creates a penalty object

### Usage

    mxPenalty(
      what,
      epsilon = 1e-05,
      scale = 1,
      how = imxPenaltyTypes,
      smoothProportion = 0.05,
      hyperparams = c(),
      hpranges = list(),
      name = NULL
    )

### Arguments

`what` | A character vector of parameters to regularize
`epsilon` | how close to zero is zero?
`scale` | a given parameter is divided by `scale` before comparison with `epsilon`
`how` | what kind of function to use
`smoothProportion` | what proportion of the region between `epsilon` and zero should be used to smooth the penalty function
`hyperparams` | a character vector of hyperparameter names
`hpranges` | a named list of hyperparameter ranges. Used in search if no ranges are specified.
`name` | Name of the regularizer object

### Details

`mxPenalty` expects to find an mxMatrix with free parameters that correspond to all named hyperparameters.

Gradient descent optimizers are designed for and work best on smooth functions. All of the regularization penalties implemented traditionally contain discontinuities. By default, OpenMx uses smoothed versions of these functions. Smoothing is controlled by `smoothProportion`. If `smoothProportion` is zero then the traditional discontinuous functions are used. Otherwise, `smoothProportion` of the region between `epsilon` and zero is used for smoothing.

[Package OpenMx version 2.20.6 Index]