graph_analysis
Public Member Functions | Static Public Member Functions | List of all members
graph_analysis::algorithms::CorrelationClustering Class Reference

Implementation of "Correlation Clustering in General Weighted Graphs" (Demaine et al., 2005) and "Correlation Clustering with partial information" (Demaine et al., 2004) More...

#include <CorrelationClustering.hpp>

Public Member Functions

 CorrelationClustering (BaseGraph::Ptr graph, EdgeWeightFunction weightfunction)
 
void round ()
 
std::map< Edge::Ptr, double > getEdgeActivation () const
 
double cut (Ball ball)
 
double volume (Ball ball)
 
Ball createBall (Vertex::Ptr vertex, double radius)
 

Static Public Member Functions

static std::string toString (const std::map< Edge::Ptr, double > &solution)
 

Detailed Description

Implementation of "Correlation Clustering in General Weighted Graphs" (Demaine et al., 2005) and "Correlation Clustering with partial information" (Demaine et al., 2004)

This is an implementation of the correlation clustering as described in: "Correlation Clustering in General Weighted Graphs" (Demaine et al., 2005) and "Correlation Clustering with partial information" (Demaine et al., 2004)

This implementation however does not(!) use non-negative edge weights, but interpretes the sign as label <+>/<-> to describe similarity.

To solve the resulting integer program the GLPK (GNU Linear Programming Kit) is used

 

Constructor & Destructor Documentation

◆ CorrelationClustering()

graph_analysis::algorithms::CorrelationClustering::CorrelationClustering ( BaseGraph::Ptr  graph,
EdgeWeightFunction  weightfunction 
)

Member Function Documentation

◆ createBall()

Ball graph_analysis::algorithms::CorrelationClustering::createBall ( Vertex::Ptr  vertex,
double  radius 
)

"A ball $B(u,r)$ of radius r around node u consists of all nodes v such that $x_uv <=r $, the subgraph induced by these nodes, and the fraction $\frac{r-x_{uv}}{x_{vw}}$ of edges $(v,w)$ with only edpoint $v \in B(u,r)$"

Returns
ball

◆ cut()

double graph_analysis::algorithms::CorrelationClustering::cut ( Ball  ball)

Compute cut for the set of nodes in ball which is part of the overall graph

"The cut of a set S of nodes, denoted by cut(S) is the weight of the positive edges with exactly one endpoint in S.[..] The cur of a ball is the cut induced by the set of vertices included in the ball."

◆ getEdgeActivation()

std::map<Edge::Ptr, double> graph_analysis::algorithms::CorrelationClustering::getEdgeActivation ( ) const
inline

Get the edge activation after performing the correlation clustering

Returns
edgemap to retrieve edge activation – 0 means active, 1 means inactive, as defined in the original algorithm

◆ round()

void graph_analysis::algorithms::CorrelationClustering::round ( )

◆ toString()

std::string graph_analysis::algorithms::CorrelationClustering::toString ( const std::map< Edge::Ptr, double > &  solution)
static

◆ volume()

double graph_analysis::algorithms::CorrelationClustering::volume ( Ball  ball)

The documentation for this class was generated from the following files: