| coef.vem_fit | R Documentation |
Returns a K \times m matrix of estimated basis coefficients.
Each column corresponds to one curve; each row to one basis function.
Coefficients are set to zero when the posterior inclusion probability
p_{ki} \leq threshold (inactive bases). When
is.composite = TRUE, the matrix has dimension \max(K) \times m,
where \max(K) is the highest K selected by GCV across all
curves; coefficients for curves with smaller optimal K are
zero-padded (structural padding).
## S3 method for class 'vem_fit'
coef(object, threshold = 0.5, ...)
object |
A |
threshold |
Numeric in |
... |
Currently unused. |
A numeric matrix of dimension \max(K) \times m, with row
names B1, B2, ... and column names Curve_1, Curve_2, ....
da Cruz, A. C., de Souza, C. P. E., & Sousa, P. H. T. O. (2024). Fast Bayesian basis selection for functional data representation with correlated errors. arXiv:2405.20758. https://arxiv.org/abs/2405.20758
vem_fit, predict.vem_fit,
summary.vem_fit
data(toy_curves)
fit <- vem_fit(y = toy_curves$y, Xt = toy_curves$Xt, K = 8)
# K x m matrix of active coefficients
coefs <- coef(fit)
dim(coefs) # 8 x 3
# Compare estimated vs true coefficients for curve 1
cbind(estimated = coefs[, 1], true = toy_curves$true_coef)
# Stricter threshold — only very confident inclusions
coef(fit, threshold = 0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.