plotBaselearner: Visualize contribution of one base learner

View source: R/plot_pe_uni.R

plotBaselearnerR Documentation

Visualize contribution of one base learner

Description

This function visualizes the contribution of a base learner to the overall prediction score. For visualization of partial effects see plotPEUni().

Usage

plotBaselearner(cboost, blname, npoints = 100L)

Arguments

cboost

(Compboost)
A trained Compboost object.

blname

(character(1L))
Name of the base learner. Must be one of cboost$getBaselearnerNames().

npoints

(integer(1L))
Number of points which are predicted for the lines (only applies to numerical features).

Value

ggplot object containing the graphic.

Examples

cboost = Compboost$new(data = iris, target = "Petal.Length",
  loss = LossQuadratic$new())
cboost$addComponents("Sepal.Width")
cboost$train(500L)
plotBaselearner(cboost, "Sepal.Width_linear")
plotBaselearner(cboost, "Sepal.Width_Sepal.Width_spline_centered")

schalkdaniel/compboost documentation built on April 15, 2023, 9:03 p.m.