deviance.sgdnet: Deviance for sgdnet Object

Description Usage Arguments Details Value See Also Examples

Description

Return the deviance for an object of class "sgdnet", typically from a fit with sgdnet(). deviance.cv_sgdnet() is a simple wrapper that calls deviance.sgdnet() on the fit to full data from cv_sgdnet().

Usage

1
2
3
4
5
## S3 method for class 'sgdnet'
deviance(object, ...)

## S3 method for class 'cv_sgdnet'
deviance(object, ...)

Arguments

object

an object of class 'sgdnet'

...

ignored

Details

This functions returns the deviance of the model along the regularization path. It is computed from the slots dev.ratio and nulldev from the "sgdnet" object using the formula

(1 - dev.ratio)*nulldev

where nulldev is the deviance of the intercept-only model.

Value

The deviance of object at each value along the regularization path. For family = "gaussian" in sgdnet(), this is the residual sum of squares.

See Also

stats::deviance(), sgdnet()

Examples

1
2
fit <- sgdnet(wine$x, wine$y, family = "multinomial")
deviance(fit)

jolars/sgdnet documentation built on May 22, 2019, 11:52 p.m.