psd_check {bnmonitor}R Documentation

Check for positive semi-definiteness after a perturbation

Description

psd_check returns a boolean to determine if the covariance matrix after a perturbation is positive semi-definite.

Usage

psd_check(x, ...)

## S3 method for class 'GBN'
psd_check(x, entry, delta, ...)

## S3 method for class 'CI'
psd_check(x, type, entry, delta, ...)

Arguments

x

object of class GBN or CI.

...

additional arguments for compatibility.

entry

a vector of length 2 indicating the entry of the covariance matrix to vary.

delta

numeric vector, including the variation parameters that act additively.

type

character string. Type of model-preserving co-variation: either total, partial, row, column or all. If all, the Frobenius norms are computed for every type of co-variation matrix.

Details

The details depend on the class the method psd_check is applied to.

Let Σ be the covariance matrix of a Gaussian Bayesian network and let D be a perturbation matrix acting additively. The perturbed covariance matrix Σ+D is positive semi-definite if

ρ(D)≤q λ_{\min}(Σ)

where λ_{\min} is the smallest eigenvalue end ρ is the spectral radius.

Value

A dataframe including the variations performed and the check for positive semi-definiteness.

Methods (by class)

References

C. Görgen & M. Leonelli (2020), Model-preserving sensitivity analysis for families of Gaussian distributions. Journal of Machine Learning Research, 21: 1-32.

Examples

psd_check(synthetic_gbn,c(2,4),-3)
psd_check(synthetic_gbn,c(2,3),seq(-1,1,0.1))
psd_check(synthetic_ci,"partial",c(2,4),0.95)
psd_check(synthetic_ci,"all",c(2,3),seq(0.9,1.1,0.01))


[Package bnmonitor version 0.1.1 Index]