Skip to content

Smith-Pittman Community Detection Algorithm for 'igraph' Objects (2024) in R

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

benyamindsmith/ig.degree.betweenness

Repository files navigation

ig.degree.betweenness

R-CMD-check arXiv downloads total

An R package for the implementation of the "Smith-Pittman" (2024) community detection algorithm. Compatible with the igraph ecosystem.

Installing this package

To install the stable release of this package from CRAN run:

install.packages("ig.degree.betweenness")

To install the development version of this package run:

# install.packages("devtools")
devtools::install_github("benyamindsmith/ig.degree.betweenness")

Sample Usage

Applying the Smith-Pittman algorithm can be done by making use of the cluster_degree_betweenness().

An example of using the code is:

library(igraphdata)
library(ig.degree.betweenness)

data("karate")

sp <- cluster_degree_betweenness(karate)
plot(
sp,
karate,
main= "Smith-Pittman Clustering"
)

Limitations

The present limitations of using this algorithm is that graphs are required to be labeled for the operations to work. For unlabeled graphs, graphs can be prepared with the prep_unlabled_graph() function.

Example:

library(igraph)
library(igraphdata)
library(ig.degree.betweenness)
data("UKfaculty")
# Making graph undirected so it looks nicer when its plotted
uk_faculty <- prep_unlabeled_graph(UKfaculty) |>
  as.undirected()

ndb <- cluster_degree_betweenness(uk_faculty)

plot(
ndb,
uk_faculty,
main= "Smith-Pittman Clustering for UK Faculty"
)

About

Smith-Pittman Community Detection Algorithm for 'igraph' Objects (2024) in R

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published