mean.nvd {nevada}R Documentation

Fréchet Mean of Network-Valued Data

Description

This function computes the sample Fréchet mean from an observed sample of network-valued random variables according to a specified matrix representation. It currently only supports the Euclidean geometry i.e. the sample Fréchet mean is obtained as the argmin of the sum of squared Frobenius distances.

Usage

## S3 method for class 'nvd'
mean(x, weights = rep(1, length(x)), representation = "adjacency", ...)

Arguments

x

An nvd object.

weights

A numeric vector specifying weights for each observation (default: equally weighted).

representation

A string specifying the graph representation to be used. Choices are adjacency, laplacian, modularity, graphon. Default is adjacency.

...

Other argument to be parsed to the mean function.

Value

The mean network in the chosen matrix representation assuming Euclidean geometry for now.

Examples

gnp_params <- list(p = 1/3)
x <- nvd(model = "gnp", n = 10L, model_params = gnp_params)
mean(x)

[Package nevada version 0.2.0 Index]