sphericalCaps: Find spherical caps with more than one node.

View source: R/betaMix.R

sphericalCapsR Documentation

Find spherical caps with more than one node.

Description

Takes a PxP adjacency Matrix as input and find apherical caps with more than one node in R^n. Cap centers can only appear in one cap, but other nodes are allowed to appear in multiple caps.

Usage

sphericalCaps(A)

Arguments

A

An adjacency Matrix(0/1), zeros on the main diagonal.

Value

A data frame with the following columns:

  • node Node number (row/column in A.)

  • capNum The cap number.

  • isCtr 1 if the node is the center of the cap, 0 otherwise.

  • deg Node degree.

  • cc Clustering coefficient.

Examples

## Not run: 
   data(SIM,package = "betaMix")
   res <- betaMix(betaMix::SIM, maxalpha = 1e-6,ppr = 0.01,subsamplesize = 30000, ind=TRUE)
   adjMat <- getAdjMat(res)
   caps <- sphericalCaps(adjMat)
   head(caps)
   am <- getAdjMat(res, signed = TRUE, nodes=caps$node[which(caps$capNum==1)])
   plotCluster(am,1,edgecols = c("blue","red"), labels=TRUE)

## End(Not run)

haimbar/betaMix documentation built on Jan. 3, 2023, 12:54 p.m.