conv_opt: Solver for Bayesian Predictive Stacking of Predictive...

View source: R/code.R

conv_optR Documentation

Solver for Bayesian Predictive Stacking of Predictive densities convex optimization problem

Description

Solver for Bayesian Predictive Stacking of Predictive densities convex optimization problem

Usage

conv_opt(scores)

Arguments

scores

matrix N \times K of expected predictive density evaluations for the K models considered

Value

W matrix of Bayesian Predictive Stacking weights for the K models considered

Examples

## Generate (randomly) K predictive scores for n observations
n <- 50
K <- 5
scores <- matrix(runif(n*K), nrow = n, ncol = K)

## Find Bayesian Predictive Stacking weights
opt_weights <- conv_opt(scores)


spBPS documentation built on Oct. 25, 2024, 5:07 p.m.