Fréchet Variance of Network-Valued Data from Inter-Point Distances
Source:R/nvd-class.R
var2_nvd.Rd
This function computes the Fréchet variance using exclusively inter-point distances. As such, it can accommodate any pair of representation and distance.
Arguments
- x
An
nvd
object listing a sample of networks.- representation
A string specifying the graph representation to be used. Choices are adjacency, laplacian, modularity, graphon. Default is adjacency.
- distance
A string specifying the distance to be used. Possible choices are: hamming, frobenius, spectral or root-euclidean. Default is frobenius.
Examples
params <- list(n = 24L, p = 1/3)
x <- nvd(sample_size = 1L, model = "gnp", !!!params)
#> ℹ Calling the `tidygraph::play_gnp()` function with the following arguments:
#> • n: 24
#> • p: 0.333333333333333
#> • directed: TRUE
#> • loops: FALSE
var2_nvd(x = x, representation = "graphon", distance = "frobenius")
#> [1] NaN