netVal: Network Validation

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/netVal.R

Description

Returns vector with the True Positives, True Negatives, False Postives, False Negatives, the Adjusted Rand Index, and the Balanced Accuracy of the test network (matrix2) compared to the true network (matrix1). Network communities are based on hierachical clustering, with communities defind by k or h.

Usage

1
  netVal(matrix1, matrix2, method='ward', k=200, h=NULL,...)

Arguments

matrix1

Adjacency matrix containing the true topology

matrix2

Adjacency matrix containing the test topology

method

Hierarchical clustering method to be passed to hclust.

k

Number of groups. Passed to cutree

h

Heights where tree is to be cut. Passed to cutree

...

Other parameters.

Details

The input matrices must be square but do not need to contain the same edges.

Value

netVal returns an vector with values True Positives, True Negatives, False Postives, False Negatives, Adjusted Rand Index, and Balanced Accuracy.

Author(s)

Shannon M. Bell

See Also

hclust{cutree}

Examples

1
2
3
4
5
 #using the state.x77 and USArrest datasets
 arrestCor<-cor(t(USArrests))
 stateCor<-cor(t(state.x77))
 netVal(stateCor, arrestCor, method='ward', k=10)
 netVal(stateCor, stateCor, method='ward', k=10)

NetComp documentation built on May 2, 2019, 8:15 a.m.

Related to netVal in NetComp...