Fro.GBN
returns the Frobenius norm between between an object of class GBN
and its update after a standard parameter variation.
Usage
# S3 method for GBN
Fro(x, entry, delta, log = TRUE, ...)
Arguments
- x
object of class
GBN
.- 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.
- log
boolean value. If
TRUE
, the logarithm of the Frobenius norm is returned. Set by default toTRUE
.- ...
additional arguments for compatibility.
Value
A dataframe including in the first column the variations performed and in the second column the corresponding Frobenius norm.
Details
Computation of the Frobenius norm between a Bayesian network and the additively perturbed Bayesian network, where the perturbation is either to the mean vector or to the covariance matrix. The Frobenius norm is not computed for perturbations of the mean since it is always equal to zero.
Examples
Fro(synthetic_gbn,c(3,3),seq(-1,1,0.1))
#> Variation Frobenius
#> 1 -1.0 NA
#> 2 -0.9 NA
#> 3 -0.8 NA
#> 4 -0.7 NA
#> 5 -0.6 NA
#> 6 -0.5 NA
#> 7 -0.4 NA
#> 8 -0.3 NA
#> 9 -0.2 -3.2188758
#> 10 -0.1 -4.6051702
#> 11 0.0 -Inf
#> 12 0.1 -4.6051702
#> 13 0.2 -3.2188758
#> 14 0.3 -2.4079456
#> 15 0.4 -1.8325815
#> 16 0.5 -1.3862944
#> 17 0.6 -1.0216512
#> 18 0.7 -0.7133499
#> 19 0.8 -0.4462871
#> 20 0.9 -0.2107210
#> 21 1.0 0.0000000