bestLayerLearner: The best layer-specific model is used as meta model.

bestLayerLearnerR Documentation

The best layer-specific model is used as meta model.

Description

The meta learner is the best layer-specific learner. This function is intended to be (internally) used as meta-learner in fuseMLR.

Usage

bestLayerLearner(x, y, perf = NULL)

Arguments

x

data.frame
data.frame of predictors.

y

vector
True target observations. Either binary or two level factor variable.

perf

function
Function to compute layer-specific performance of learners. If NULL, the Brier Score (classification) or a mean squared error (regression) is used by default as performance measure. Otherwise, the performance function must accept two parameters: observed (observed values) and predicted (predicted values).

Value

A model object of class weightedMeanLeaner.

Examples

set.seed(20240624L)
x = data.frame(x1 = runif(n = 50L, min = 0, max = 1))
y = sample(x = 0L:1L, size = 50L, replace = TRUE)
my_best_model = bestLayerLearner(x = x, y = y)

fuseMLR documentation built on April 3, 2025, 8:49 p.m.