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

Description Usage Arguments Value Author(s) See Also

View source: R/predict.widenet.R

Description

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

Usage

1
2
3
4
5
6
7
## S3 method for class 'widenet'
predict(object,
        newx,
        order = object$which.order.min,
        alpha.val = object$which.alpha.min,
        type = c("link", "response", "coefficients", "nonzero", "class"),
	...)

Arguments

object

The "widenet" object from which to get predictions.

newx

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

order

Specifies the order for which predictions are required. Must be equal to one of the elements of the order argument for the object. The default is to use that order which "won" the cross-validation.

alpha.val

Value of alpha at which predictions are required. Default is to use that value which "won" the cross-validation.

type

See link[glmnet]{predict.glmnet}.

...

Further arguments passed to predict.cv.relaxnet, which should be passed through to predict.glmnet. However, in the current version, these are not guaranteed to work correctly (for example, offset has not yet been implemented for widenet).

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

widenet, predict.cv.relaxnet, predict.glmnet


widenet documentation built on May 2, 2019, 2:10 p.m.