attributeConnector: Extract the class-wise degree of an adjacency matrix.

View source: R/RcppExports.R

attributeConnectorR Documentation

Extract the class-wise degree of an adjacency matrix.

Description

For a adjacency matrix as computed by full_graph, the function computes how many row-column interactions connect rows (columns) to columns (rows) of a specific class/category.

Usage

attributeConnector(mat, otherclasses, useOther = FALSE)

Arguments

mat

A adjacency matrix with bipartite interactions as computed by full_graph or attribute_graph (with parameter bipartite=TRUE).

otherclasses

A logical vector indicating two classes of elements in rows (columns).

useOther

Logical indicating if the attributes, that are classified appear first in the matrix (True) or the attributes that connect classified attributes (False).

Value

A DataFrame that holds the total degree of every attribute (row/column) and the fraction of the degree that connects only to elements of class True (from parameter otherclasses).

Examples

m <- matrix(seq(1:16), nrow=4)
# m <- matrix(rnorm(10000), nrow=100)
# bics <- c(run_fabia(m), run_isa(m), run_plaid(m))
# fn <- feature_network(bics, m)
# attributeConnector(apply_threshold(fn), 
#     otherclasses=c(rep(FALSE, 100), rep(TRUE, 100)))


tdrose/mosbi documentation built on May 4, 2022, 3:22 p.m.