Skip to content

Instantly share code, notes, and snippets.

View greed2411's full-sized avatar
:octocat:
chilling at some local minima ...

Jaivarsan greed2411

:octocat:
chilling at some local minima ...
View GitHub Profile
@greed2411
greed2411 / circular_buffer.cpp
Created July 29, 2021 14:30 — forked from edwintcloud/circular_buffer.cpp
Circular Buffer in C++
//===================================================================
// File: circular_buffer.cpp
//
// Desc: A Circular Buffer implementation in C++.
//
// Copyright © 2019 Edwin Cloud. All rights reserved.
//
//===================================================================
//-------------------------------------------------------------------
@greed2411
greed2411 / circular_buffer.cpp
Created July 29, 2021 14:30 — forked from edwintcloud/circular_buffer.cpp
Circular Buffer in C++
//===================================================================
// File: circular_buffer.cpp
//
// Desc: A Circular Buffer implementation in C++.
//
// Copyright © 2019 Edwin Cloud. All rights reserved.
//
//===================================================================
//-------------------------------------------------------------------
@greed2411
greed2411 / Install NVIDIA Driver and CUDA.md
Created November 24, 2018 00:42 — forked from chaiyujin/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
@greed2411
greed2411 / distributed-shortest-path-note.md
Created November 20, 2018 08:55 — forked from srirambaskaran/distributed-shortest-path-note.md
A note on implementing community detection using Apache Spark + GraphX

A note on implementing community detection using Apache Spark + GraphX

Girvan Newman Algorithm

This is one of the earliest methods of community detection. This method is simple to understand and can be easily distributed across clusters for faster processing. Key assumption is that the graph is undirected and unweighted. But it is not hard to extend to directed graphs + weighted edges.

The algorithm is fairly straightforward. It defines a new measure called edge betweenness centrality based on which a divisive hierarchical clustering algorithm is designed to find communities. The stopping criteria for this uses a popular metric called modularity which quantifies how cohesive the communities are during the clustering process.

Side note: A bit of search reveled no implementation of this algorithm in a distributed way (mainly because its slow and better algorithms are available?). So, this note would pave way to use this naive algorithm inspite of its high time complexity.