Skip to contents

Fro.CI returns the Frobenius norm between an object of class CI and its update after a model-preserving parameter variation.

Usage

# S3 method for CI
Fro(x, type, entry, delta, log = TRUE, ...)

Arguments

x

object of class CI.

type

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

entry

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

delta

numeric vector with positive elements, including the variation parameters that act multiplicatively.

log

boolean value. If TRUE, the logarithm of the Frobenius norm is returned. Set by default to TRUE.

...

additional arguments for compatibility.

Value

A dataframe including in the first column the variations performed, and in the following columns the corresponding Frobenius norms for the chosen model-preserving co-variations.

Details

Computation of the Frobenius norm between a Bayesian network and its updated version after a model-preserving variation.

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

Fro(synthetic_ci,"total",c(1,1),seq(0.9,1.1,0.01))
#>    Variation Frobenius
#> 1       0.90 -4.605170
#> 2       0.91 -4.815891
#> 3       0.92 -5.051457
#> 4       0.93 -5.318520
#> 5       0.94 -5.626821
#> 6       0.95 -5.991465
#> 7       0.96 -6.437752
#> 8       0.97 -7.013116
#> 9       0.98 -7.824046
#> 10      0.99 -9.210340
#> 11      1.00      -Inf
#> 12      1.01 -9.210340
#> 13      1.02 -7.824046
#> 14      1.03 -7.013116
#> 15      1.04 -6.437752
#> 16      1.05 -5.991465
#> 17      1.06 -5.626821
#> 18      1.07 -5.318520
#> 19      1.08 -5.051457
#> 20      1.09 -4.815891
#> 21      1.10 -4.605170
Fro(synthetic_ci,"partial",c(1,4),seq(0.9,1.1,0.01))
#>    Variation  Frobenius
#> 1       0.90         NA
#> 2       0.91 -0.2309237
#> 3       0.92 -0.4664898
#> 4       0.93 -0.7335526
#> 5       0.94 -1.0418540
#> 6       0.95 -1.4064971
#> 7       0.96 -1.8527842
#> 8       0.97 -2.4281483
#> 9       0.98 -3.2390785
#> 10      0.99 -4.6253729
#> 11      1.00       -Inf
#> 12      1.01 -4.6253729
#> 13      1.02 -3.2390785
#> 14      1.03 -2.4281483
#> 15      1.04 -1.8527842
#> 16      1.05         NA
#> 17      1.06         NA
#> 18      1.07         NA
#> 19      1.08         NA
#> 20      1.09         NA
#> 21      1.10         NA
Fro(synthetic_ci,"column",c(1,2),seq(0.9,1.1,0.01))
#>    Variation Frobenius
#> 1       0.90        NA
#> 2       0.91        NA
#> 3       0.92        NA
#> 4       0.93        NA
#> 5       0.94        NA
#> 6       0.95 -3.218876
#> 7       0.96 -3.665163
#> 8       0.97 -4.240527
#> 9       0.98 -5.051457
#> 10      0.99 -6.437752
#> 11      1.00      -Inf
#> 12      1.01 -6.437752
#> 13      1.02 -5.051457
#> 14      1.03 -4.240527
#> 15      1.04 -3.665163
#> 16      1.05 -3.218876
#> 17      1.06 -2.854233
#> 18      1.07 -2.545931
#> 19      1.08        NA
#> 20      1.09        NA
#> 21      1.10        NA
Fro(synthetic_ci,"row",c(3,2),seq(0.9,1.1,0.01))
#>    Variation  Frobenius
#> 1       0.90         NA
#> 2       0.91         NA
#> 3       0.92         NA
#> 4       0.93         NA
#> 5       0.94         NA
#> 6       0.95         NA
#> 7       0.96         NA
#> 8       0.97 -2.9526728
#> 9       0.98 -3.7636030
#> 10      0.99 -5.1498974
#> 11      1.00       -Inf
#> 12      1.01 -5.1498974
#> 13      1.02 -3.7636030
#> 14      1.03 -2.9526728
#> 15      1.04 -2.3773086
#> 16      1.05 -1.9310215
#> 17      1.06 -1.5663784
#> 18      1.07 -1.2580771
#> 19      1.08 -0.9910143
#> 20      1.09 -0.7554482
#> 21      1.10         NA