get_edge_weights: Calculate edge weights

View source: R/cluster_factory.R

get_edge_weightsR Documentation

Calculate edge weights

Description

Calculate edge weights

Usage

get_edge_weights(overlap_lengths, cluster_sizes, edges)

Arguments

overlap_lengths

A named vector of cluster overlap lengths, obtained by calling length() on the output from [get_overlaps()].

cluster_sizes

A vector of cluster sizes.

edges

A 2D array of source and target nodes, representing an edge list. Should be ordered consistently with the overlap_lengths parameter.

Details

This value is calculated per edge by dividing the number of data points in the overlap by the number of points in the cluster on either end, and taking the maximum value. Formally,

w(\{c_i, c_j\}) = \displaystyle\max\left\{\dfrac{|c_i \cap c_j|}{|c_i|}, \dfrac{|c_i\cap c_j|}{|c_j|}\right\}

Value

A vector of real numbers representing cluster overlap strength.


mappeR documentation built on April 3, 2025, 6:19 p.m.