predict_veb_boost_stumps: Performs a prediction using a 'veb_boost_stumps' fit and...

View source: R/util_functions.R

predict_veb_boost_stumpsR Documentation

Performs a prediction using a 'veb_boost_stumps' fit and supplied X_test objects (for non-stumps learners)

Description

This function performs a prediction using a 'veb_boost_stumps' fit and supplied X_test objects. If the 'veb_boost_stumps' object was created with 'L' different learners, then 'X_test_list' must be a list of length 'L-1', in the order corresponding to the learners. The last predictor object is made using the stumps matrix from the stumps learners

Usage

predict_veb_boost_stumps(
  veb_fit_stumps,
  X_test,
  X_test_list = NULL,
  moment = c(1, 2)
)

Arguments

veb_fit_stumps

is the fitted object from veb_boost_stumps

X_test

is a matrix to be used when making the new stumps matrix for the stumps learners

X_test_list

is a list of predictor objects. This must be of the same length as the list of learners used in fitting 'veb_fit_stumps'

moment

is the desired posterior moment to calculate. This can be either 1, 2, or c(1, 2)

Details

This function takes in a return object from veb_boost_stumps and a list of predictor objects and calculates the desired posterior moments.

Value

a vector of first posterior moments, second posterior moments, or a matrix whose columns are the first and second posterior moments respectively (depending on the supplied 'moment')


stephenslab/VEB.Boost documentation built on July 2, 2023, 1 p.m.