predict.relaxnet: Predict Method for '"relaxnet"' Objects

Description Usage Arguments Value Author(s) See Also

Description

Similar to other predict methods, this functions predicts fitted values, logits, coefficients and more from a fitted "relaxnet" object.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'relaxnet'
predict(object,
        newx,
        which.model,
        s = NULL,
        type = c("link", "response", "coefficients", "nonzero", "class"),
        exact = FALSE,
	...)

Arguments

object

The "relaxnet" object from which to get predictions.

newx

Matrix of new values for x at which predictions are to be made. Must be a matrix; can be sparse as in Matrix package. This argument is not used for type=c("coefficients","nonzero")

which.model

Specifies the submodel from which predictions are required. "main" indicates the main glmnet model, while an integer indicates one of the relaxed models.

s

Value(s) of the penalty parameter lambda at which predictions are required. Default is the entire sequence of lambda values for the model specified by which.model.

type

See link[glmnet]{predict.glmnet}.

exact

Only the default, FALSE, is supported. See link[glmnet]{predict.glmnet}.

...

Further arguments passed to predict.glmnet. In the current version, these are not guaranteed to work correctly (for example, offset has not yet been implemented for relaxnet).

Value

The object returned depends on type.

Author(s)

Stephan Ritter, with design contributions from Alan Hubbard.

Much of the code (and some help file content) is adapted from the glmnet package, whose authors are Jerome Friedman, Trevor Hastie and Rob Tibshirani.

See Also

relaxnet, predict.glmnet


relaxnet documentation built on May 2, 2019, 12:39 p.m.