.calcPenalty {glmSparseNet} | R Documentation

## Calculate penalty based on data

### Description

Internal method to calculate the network using data-dependant methods

### Usage

    .calcPenalty(xdata, penalty.type, network.options = networkOptions())

### Arguments

`xdata` | input data
`penalty.type` | which method to use
`network.options` | options to be used

### Value

vector with penalty weights

### Examples

    xdata <- matrix(rnorm(100), ncol = 20)
    glmSparseNet:::.calcPenalty(xdata, 'none')
    glmSparseNet:::.calcPenalty(xdata, 'correlation',
                                networkOptions(cutoff = .6))
    glmSparseNet:::.calcPenalty(xdata, 'correlation')
    glmSparseNet:::.calcPenalty(xdata, 'covariance',
                                networkOptions(cutoff = .6))
    glmSparseNet:::.calcPenalty(xdata, 'covariance')
    glmSparseNet:::.calcPenalty(xdata, 'sparsebn')

[Package glmSparseNet version 1.8.1 Index]