symmetrizeNetwork: Make an adjacency matrix symmetric

View source: R/subnetworks.R

symmetrizeNetworkR Documentation

Make an adjacency matrix symmetric

Description

This makes a adjacency matrix symmetric by averaging each value with its transpose.

Usage

symmetrizeNetwork(mat, rule = c("AND", "OR"))

Arguments

mat

An adjacency matrix.

rule

When two nodes are not bidirectionally connected, what should be done? "AND" (default) deletes the edge, while "OR" keeps the halved edge weight.

Details

This follows the implementation of the IsingFit package.

Value

A symmetric adjacency matrix.

Author(s)

Sercan Kahveci


Spiritspeak/skMisc documentation built on April 12, 2025, 5:40 a.m.