Skip to contents

This function accepts a dataframe that is structured to have one column `Y` and other columns with unique names corresponding to different model predictions for `Y`, and it will use nonnegative least squares to determine the weights to use for a SuperLearner.

Usage

determine_super_learner_weights_nnls(data, yvar)

Arguments

data

A data frame consisting of an outcome (y_variable) and other columns corresponding to predictions from candidate learners.

yvar

The string name of the outcome column in `data`.

Value

A vector of weights to be used for each of the learners.