mean.nvd: Fréchet Mean of Network-Valued Data

View source: R/nvd-class.R

mean.nvdR 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)

ilovato/nevada documentation built on Sept. 12, 2023, 8:12 a.m.