Learn R Programming

pre (version 0.3.0)

print.gpe: 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 gpe
print(x, penalty.par.val = "lambda.1se",
  digits = getOption("digits"), ...)

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

Arguments

x

An object of class pre.

penalty.par.val

character. Information for which final prediction rule ensemble(s) should be printed? The ensemble with penalty parameter criterion yielding minimum cv error ("lambda.min") or penalty parameter yielding error within 1 standard error of minimum cv error ("lambda.1se")? Alternatively, a numeric value may be specified, corresponding to one of the values of lambda in the sequence used by glmnet, for which estimated cv error can be inspected by running x$glmnet.fit and plot(x$glmnet.fit).

digits

Number of digits to print

...

Additional arguments, currently not used

Value

Prints information about the fitted prediction rule ensemble.

Details

Note that the cv error is estimated with data that was also used for learning rules and may be too optimistic. Use cvpre() to obtain an accurate estimate of future prediction error.

See Also

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

Examples

Run this code
# NOT RUN {
set.seed(42)
airq.ens <- pre(Ozone ~ ., data = airquality[complete.cases(airquality),])
print(airq.ens)
# }

Run the code above in your browser using DataLab