print.pre: Print method for objects of class pre

View source: R/pre.R

print.preR Documentation

Print method for objects of class pre

Description

print.pre prints information about the generated prediction rule ensemble to the command line

Usage

## S3 method for class 'pre'
print(x, penalty.par.val = "lambda.1se", digits = getOption("digits"), ...)

Arguments

x

An object of class pre.

penalty.par.val

character or numeric. Value of the penalty parameter \lambda to be employed for selecting the final ensemble. The default "lambda.min" employs the \lambda value within 1 standard error of the minimum cross-validated error. Alternatively, "lambda.min" may be specified, to employ the \lambda value with minimum cross-validated error, or a numeric value >0 may be specified, with higher values yielding a sparser ensemble. To evaluate the trade-off between accuracy and sparsity of the final ensemble, inspect pre_object$glmnet.fit and plot(pre_object$glmnet.fit).

digits

Number of decimal places to print

...

Further arguments to be passed to coef.cv.glmnet.

Details

Note that the CV error is estimated with data that was also used for learning rules and may be too optimistic. Use function cvpre to obtain a more realistic estimate of future prediction error.

Value

Prints information about the fitted prediction rule ensemble.

See Also

pre, summary.pre, plot.pre, coef.pre, importance.pre, predict.pre, interact, cvpre

Examples

set.seed(42)
airq.ens <- pre(Ozone ~ ., data = airquality[complete.cases(airquality),])
print(airq.ens)

pre documentation built on May 29, 2024, 5:10 a.m.