predict_veb_boost: Performs a prediction using a 'veb_boost' fit and supplied...

View source: R/util_functions.R

predict_veb_boostR Documentation

Performs a prediction using a 'veb_boost' fit and supplied X_test objects

Description

This function performs a prediction using a 'veb_boost' fit and supplied X_test objects. If the 'veb_boost' object was created with 'L' different learners, then 'X_test_list' must be a list of length 'L', in the order corresponding to the learners

Usage

predict_veb_boost(veb_fit, X_test_list, moment = c(1, 2))

Arguments

veb_fit

is the fitted object from veb_boost

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'

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 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.