R/print.SuperLearner.R

Defines functions coef.CV.SuperLearner print.CV.SuperLearner coef.SuperLearner print.SuperLearner

Documented in coef.CV.SuperLearner coef.SuperLearner print.CV.SuperLearner print.SuperLearner

print.SuperLearner <- function(x, ...) {
	cat("\nCall: ", deparse(x$call, width.cutoff = .9*getOption("width")), "\n\n", fill = getOption("width"))
	print(cbind(Risk = x$cvRisk, Coef = x$coef))
}

coef.SuperLearner <- function(object, ...) {
	object$coef
}

print.CV.SuperLearner <- function(x, ...) {
	cat("\nCall: ", deparse(x$call, width.cutoff = .9*getOption("width")), "\n\n", fill = getOption("width"))
	cat("Cross-validated predictions from the SuperLearner:  SL.predict \n\nCross-validated predictions from the discrete super learner (cross-validation selector):  discreteSL.predict \n\nWhich library algorithm was the discrete super learner:  whichDiscreteSL \n\nCross-validated prediction for all algorithms in the library:  library.predict\n")
}

coef.CV.SuperLearner <- function(object, ...) {
	object$coef
}

Try the SuperLearner package in your browser

Any scripts or data that you put into this service are public.

SuperLearner documentation built on May 29, 2024, 5:25 a.m.