model_pres_cov {bnmonitor} | R Documentation |
Model-preserving co-variation for objects of class CI
.
model_pres_cov(ci, type, entry, delta)
ci |
object of class |
type |
character string. Type of model-preserving co-variation: either |
entry |
a vector of length two specifying the entry of the covariance matrix to vary. |
delta |
multiplicative variation coefficient for the entry of the covariance matrix given in |
Let the original Bayesian network have a Normal distribution \mathcal{N}(μ,Σ) and let entry
be equal to (i,j). For a multiplicative variation of the covariance matrix by an amount δ, a variation matrix Δ is constructed as
Δ_{k,l}=≤ft\{ \begin{array}{ll} δ & \mbox{if } k=i, l=j\\ δ & \mbox{if } l=i, k=j \\ 0 & \mbox{otherwise} \end{array} \right.
A co-variation matrix \tildeΔ is then constructed and the resulting distribution after the variation is \mathcal{N}(μ,\tildeΔ\circΔ\circΣ), assuming \tildeΔ\circΔ\circΣ is positive semi-definite and where \circ denotes the Schur (or element-wise) product. The matrix \tildeΔ is so constructed to ensure that all conditional independence in the original Bayesian networks are retained after the parameter variation.
If the resulting covariance is positive semi-definite, model_pres_cov
returns an object of class CI
with an updated covariance matrix. Otherwise it returns an object of class npsd.ci
, which has the same components of CI
but also has a warning entry specifying that the covariance matrix is not positive semi-definite.
C. GĂ¶rgen & M. Leonelli (2020), Model-preserving sensitivity analysis for families of Gaussian distributions. Journal of Machine Learning Research, 21: 1-32.
covariance_var
, covariation_matrix
model_pres_cov(synthetic_ci,"partial",c(1,3),1.1) model_pres_cov(synthetic_ci,"partial",c(1,3),0.9) model_pres_cov(synthetic_ci,"total",c(1,2),0.5) model_pres_cov(synthetic_ci,"row",c(1,3),0.98) model_pres_cov(synthetic_ci,"column",c(1,3),0.98)