Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

print.train

Print Method for the train Class


Description

Print the results of a train object.

Usage

## S3 method for class 'train'
print(
  x,
  printCall = FALSE,
  details = FALSE,
  selectCol = FALSE,
  showSD = FALSE,
  ...
)

Arguments

x

an object of class train.

printCall

a logical to print the call at the top of the output

details

a logical to show print or summary methods for the final model. In some cases (such as gbm, knn, lvq, naive Bayes and bagged tree models), no information will be printed even if details = TRUE

selectCol

a logical whether to add a column with a star next to the selected parameters

showSD

a logical whether to show the standard deviation of the resampling results within parentheses (e.g. "4.24 (0.493)")

...

options passed to format

Details

The table of complexity parameters used, their resampled performance and a flag for which rows are optimal.

Value

A matrix with the complexity parameters and performance (invisibly).

Author(s)

Max Kuhn

See Also

Examples

## Not run: 
data(iris)
TrainData <- iris[,1:4]
TrainClasses <- iris[,5]

options(digits = 3)

library(klaR)
rdaFit <- train(TrainData, TrainClasses, method = "rda",
                control = trainControl(method = "cv"))
rdaFit
print(rdaFit, showSD = TRUE)

## End(Not run)

caret

Classification and Regression Training

v6.0-86
GPL (>= 2)
Authors
Max Kuhn [aut, cre], Jed Wing [ctb], Steve Weston [ctb], Andre Williams [ctb], Chris Keefer [ctb], Allan Engelhardt [ctb], Tony Cooper [ctb], Zachary Mayer [ctb], Brenton Kenkel [ctb], R Core Team [ctb], Michael Benesty [ctb], Reynald Lescarbeau [ctb], Andrew Ziem [ctb], Luca Scrucca [ctb], Yuan Tang [ctb], Can Candan [ctb], Tyler Hunt [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.