projectIGraph: Compute the projection of a graph on a grid

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/graph_som.R

Description

Compute the projection of a graph, provided as an igraph object, on the grid of the somRes object.

Usage

1
projectIGraph(object, init.graph, ...)

Arguments

object

a somRes object.

init.graph

an igraph whose number of vertices is equal to the clustering length of the somRes object.

...

Not used.

Value

The result is an igraph which vertexes are the clusters (the clustering is thus understood as a vertex clustering) and the edges are the counts of edges in the original graph between two vertices corresponding to the two clusters in the projected graph or, if init.graph is a weighted graph, the sum of the weights between the pairs of vertices corresponding to the two clusters.

The resulting igraph object's attributes are:

Author(s)

Madalina Olteanu olteanu@ceremade.dauphine.fr
Nathalie Vialaneix nathalie.vialaneix@inrae.fr

References

Olteanu M., Villa-Vialaneix N. (2015) Using SOMbrero for clustering and visualizing graphs. Journal de la Société Française de Statistique, 156, 95-119.

See Also

projectIGraph.somSC which uses the results of a super-clustering to obtain another projected graph. plot.somRes with the option type="graph" or plot.somSC with the option type="projgraph".

Examples

1
2
3
4
5
data(lesmis)
set.seed(7383)
mis.som <- trainSOM(x.data=dissim.lesmis, type="relational", nb.save=10)
proj.lesmis <- projectIGraph(mis.som, lesmis)
## Not run: plot(proj.lesmis)

Example output

Loading required package: knitr
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union


***********************************************************

      This is 'SOMbrero' package, v 1.2

Citation details with citation('SOMbrero')

Further information with help(SOMbrero)...

Use sombreroGUI() to start the Graphical Interface.

Warning! This package has been implemented (mostly) by girls.
Default colors may not be suited for men.

***********************************************************

SOMbrero documentation built on Jan. 4, 2022, 1:07 a.m.