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

write.method.template

Method to estimate the coefficients for the super learner


Description

These functions contain the information on the loss function and the model to combine algorithms

Usage

write.method.template(file = "", ...)

## a few built in options:
method.NNLS()
method.NNLS2()
method.NNloglik()
method.CC_LS()
method.CC_nloglik()
method.AUC(nlopt_method=NULL, optim_method="L-BFGS-B", bounds=c(0, Inf), normalize=TRUE)

Arguments

file

A connection, or a character string naming a file to print to. Passed to cat.

optim_method

Passed to the optim call method. See optim for details.

nlopt_method

Either optim_method or nlopt_method must be provided, the other must be NULL

bounds

Bounds for parameter estimates

normalize

Logical. Should the parameters be normalized to sum up to 1

...

Additional arguments passed to cat.

Details

A SuperLearner method must be a list (or a function to create a list) with exactly 3 elements. The 3 elements must be named require, computeCoef and computePred.

Value

A list containing 3 elements:

require

A character vector listing any required packages. Use NULL if no additional packages are required

computeCoef

A function. The arguments are: Z, Y, libraryNames, obsWeights, control, verbose. The value is a list with two items: cvRisk and coef. This function computes the coefficients of the super learner. As the super learner minimizes the cross-validated risk, the loss function information is contained in this function as well as the model to combine the algorithms in SL.library.

computePred

A function. The arguments are: predY, coef, control. The value is a numeric vector with the super learner predicted values.

Author(s)

Eric C Polley epolley@uchicago.edu

See Also

Examples

write.method.template(file = '')

SuperLearner

Super Learner Prediction

v2.0-28
GPL-3
Authors
Eric Polley [aut, cre], Erin LeDell [aut], Chris Kennedy [aut], Sam Lendle [ctb], Mark van der Laan [aut, ths]
Initial release
2021-05-04

We don't support your browser anymore

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