compare: Compare two decks of (bi-)communities

Description Usage Arguments Value

Description

Given two decks of bi-communities, compare these two decks (for similariy and differences) using a collection of metrics.

Usage

1
2
compare(comms1, comms2, wt.x = 0.5, wt.y = 0.5, weights = function(nums)
  nums > 0.9, weak_coverage = TRUE)

Arguments

comms1, comms2

list. Deck of communites. For instance the object returned by comms

wt.x, wt.y

numeric. The weightage to be given to X, Y sides while comparing approximate distances. For instances if wt.x = 1, then two communites with same X set will be considered equal.

weights

function. This is a weightage function which is used to assess if two communities are equal/contained to each other based on their (perhaps one way) jaccard distances. The default value is function(nums) nums > .9 which is a binary function, which asseses yes/no based on the theshold .9, but it is possible to have a smoother transition.

weak_coverage

Boolean. For "coverage" metric, use the strong or weak version.

Value

A list containing following

report1, report2

report1, report2 are lists with entries corresponding to each community in comms1 and comms2 repectively. Each entry is a report which compares that community to the other pile. This report has

coverage

Coverage is a measure of "how much of this community is found in the other deck combined". Weak coverage, only looks at the X and Y sets, while strong coverage actually looks at number of pairs.

outer_coverage

(Actually, this metric is not very useful) This measures how well the community is covered by communities in the other deck that "contain it". Quotations were used in the previous sentence because the notion is approximately used. (see the weights parameter) This number will typically be close to 1 if the community is contained inside some community from the other deck.

inner_coverage

This measures how well the community is covered by communities in the other deck that are "contained in it". This number will typically be close to 0.

closest_match

This measures the closest match to the communities from the other deck

OL12, OL21

These are overlap matrices. OL12[i,j] gives the fraction of community i that is present in community j


miheerdew/BMD-metrics documentation built on May 15, 2019, 5:03 a.m.