gs.edge.threshold: Threshold a weighted graph.

Description Usage Arguments Value Author(s)

Description

Extracts (non-zero) 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.threshold(g, edge.attr = NULL, threshold = 0, method = "absolute",
  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).

threshold

the threshold for removing edges. Defaults to 0. Sets edges thresholded away to 0 and edges included in the threshold range to 1.

method

The method to use for thresholding. Defaults to "absolute".

  • "absolute"Remove edges less than threshold.

  • "percentile"Remove edges less than the threshold percentile. If method is "percentile", threshold should be less than 1.'

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.

eps

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

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.