gs.edge.log: Run pass-to-log on a weighted graph.

Description Usage Arguments Value Author(s)

Description

Extracts edge weight vector W from a graph and replaces it with log(W + eps) where log is the logarithm operation.

Usage

1
2
gs.edge.log(g, edge.attr = NULL, base = exp(1), eps = 1,
  output.type = "matrix")

Arguments

g

an igraph object or an nxn adjacency matrix with n vertices.

edge.attr

if g is a igraph, the name of the attribute to use for weights. Defaults to NULL, which assumes the graph is binary.

is.null(edge.attr)

constructs sbm on the graph as a binary adjacency matrix.

is.character(edge.attr)

constructs sbm of the graph the graph as a weighted adjacency matrix, with edge-weights for E(g) given by get.edge.attribute(g, attr=edge.attr).

base

the base for the logarithm operation. Defaults to base exp(1), or the natural logarithm. Options are real numbers greater than 0.

eps

the offset for taking the logarithm, in the event that there are entries of g that are less than or equal to 0.

output.type

the type of output to produce for the between community expectations. Defaults to matrix.

"matrix"

produces a matrix for the between-communitity interactions.

"graph"

produces an igraph object for the between-community interactions.

Value

an igraph object or an nxn adjacency matrix with n vertices depending on output.type.

Author(s)

Eric Bridgeford ericwb95@gmail.com


neurodata/graphstats documentation built on May 14, 2019, 5:19 p.m.