Visual analytics for comparing cluster sets

How similar are your clusterings, and how well do they fit your network?

VICTOR compares the results of different clustering algorithms, or of one algorithm with different settings, on the same objects. If you also have the network they came from, it checks how well each result fits it.

Everything runs in your browser. Your files are never uploaded.

Two things you can do

Compare clusterings with each other

Load two or more clustering results and score how similar every pair is, with 27 metrics and seven kinds of plots. Answers "do these methods agree?"

Check clusterings against a network

Load a network and score how well separated the clusters of each result are on it: conductance, density, modularity and coverage. Answers "which result fits the network best?" The network and clusters can then be opened in NORMA.

The two work together: the cluster sets you load are shared, and once a network is loaded the Compare step also shows how each compared set scores on it.

How it works

1

Load & prepare

Load one file per clustering result. If the files do not contain the same objects, VICTOR tells you and offers the fix with one click.

2

Compare

Choose from 27 similarity metrics, each with a short explanation, and read the scores for every pair of results.

3

Plots

See the same scores as a heatmap, a ranking of the sets, a similarity map, or pair bars, Sankey, network and circos plots, and save any of them as an image.

What you can do

27 comparison metrics

Counting pairs, cluster matching and mutual information, including chance-corrected ones and two for overlapping clusters.

See what the sets share

An UpSet plot shows which objects each result contains, and cluster matching shows which clusters correspond.

Cluster quality on a network

Load a network to get conductance, internal density, cut ratio, modularity and coverage for a clustering.

Publication-ready export

Every plot as PNG, SVG, PDF, JPEG or WebP at high resolution, and every table as CSV.

What a cluster set file looks like

cluster1	F18,F22,F28,F32
cluster2	F05,F10,F14
cluster3	F06,F11

One cluster per line: the cluster name, a tab, then its members separated by commas. More in .

VICTOR does not run clustering and does not pick a best result; it shows where results agree. If you use it, please cite Karatzas et al., Computers in Biology and Medicine 135 (2021) 104557.

Compare the results of different clusterings

See how similar two or more groupings of the same objects are.

  1. Load one file per clustering result, or try an example.
  2. Make them comparable if they do not contain the same objects. VICTOR tells you when and offers the fix.
  3. Compare with the metrics you choose, then plot the result.

VICTOR API

Other programs can open VICTOR with their own cluster sets and networks, and read the results back, so that a clustering pipeline, a notebook or another web page can hand its results to VICTOR with one call. There are three ways in, all taking the same payload:

Link
A link to VICTOR that carries the data after #json=. Needs nothing else; suits small data.
postMessage
A web page opens VICTOR in a window or an iframe and sends it the payload. It can also ask for the results as JSON.
JavaScript
window.VICTOR.api, for scripts running on this page or in the browser console.

VICTOR has no server: the data stays in the browser in all three cases, and there is no REST address to call.

The payload

A JSON object:

clusterSets
List of cluster sets, each {"name", "clusters"}. clusters is an object {"cluster": ["member", …]} or a list of {"name", "members"}. Instead of clusters, text may hold the content of a VICTOR cluster set file.
networks
Optional list of networks, each {"name", "edges"} with edges as {"source", "target", "weight"} (weight optional), or text with an edge list.
metrics
Optional list of metric codes, for example ["adjrand", "ami"]. The codes are the ones in the CSV export; an unknown code is reported with the full list.
filter
"none" (default), "intersection" (shared objects only) or "superset" (all objects, adding singletons). sizeMin and sizeMax set the cluster size range.
reference
Name of a cluster set: compare every other set against it instead of every pair.
tab, plot, metric, theme
What to show: tab "files", "compare", "plots" or "quality"; plot "heatmap", "ranking", "map", "bar", "sankey", "network" or "circos"; the metric plotted; "light" or "dark".

Loading a payload replaces whatever is loaded. A payload with a mistake is refused as a whole, with a message saying what is wrong.

Try it

Edit the payload and choose what to do with it.


      

Link

The payload as base64url-encoded JSON after #json=. The part after # is never sent to any server. "Make a link" above builds one for this copy of VICTOR.

https://pavlopoulos-lab-services.org/victor/index.html#json=eyJjbHVzdGVyU2V0cyI6W3sibmFtZSI6Ik1ldGhvZCBBIiwi…
# Python
import base64, json, webbrowser
payload = {"clusterSets": [{"name": "Louvain", "clusters": {"c1": ["a", "b"], "c2": ["c"]}},
                           {"name": "MCL", "clusters": {"k1": ["a"], "k2": ["b", "c"]}}]}
code = base64.urlsafe_b64encode(json.dumps(payload).encode()).decode().rstrip("=")
webbrowser.open("https://pavlopoulos-lab-services.org/victor/index.html#json=" + code)

postMessage

VICTOR sends {"type": "victor:ready"} to the page that opened or embeds it once it has started, and answers {"type": "victor:ping"} the same way. Then send one of:

victor:load
{"type": "victor:load", "payload": …, "requestId": 1} shows the data. Answer: {"type": "victor:loaded", "ok": true, "summary": …}, or "ok": false with "error".
victor:compute
Same message with type victor:compute. Answer: {"type": "victor:results", "ok": true, "summary", "comparison", "quality"} with every metric value for every pair and, when networks were sent, the quality of every set on every network.
const victor = window.open("https://pavlopoulos-lab-services.org/victor/index.html", "_blank");
window.addEventListener("message", (e) => {
  if (e.source !== victor) return;
  if (e.data.type === "victor:ready")
    victor.postMessage({ type: "victor:compute", requestId: 1, payload }, "*");
  if (e.data.type === "victor:results")
    console.log(e.data.ok ? e.data.comparison.pairs : e.data.error);
});

JavaScript

VICTOR.api.load(payload)   // same as victor:load; returns the summary, throws on a bad payload
VICTOR.api.results()       // the comparison on screen: clusterSets, metrics, pairs, matrix
VICTOR.api.quality()       // every loaded cluster set on every loaded network
VICTOR.api.link(payload)   // a #json= link to this copy of VICTOR
VICTOR.api.version         // "1.0"

Limits and privacy

  • Nothing is uploaded: links, messages and scripts all hand the data to the page in your browser.
  • Messages are accepted only from the page that opened VICTOR or embeds it. Results are returned only for data sent in the same request, so another page cannot read what you loaded here yourself.
  • Payloads cannot run code: names are always shown as text.
  • Links carry the whole payload, so keep them for small data; a few thousand characters is safe everywhere.

What's new Latest update: 01/2027

This version replaces the R/Shiny application described in the 2021 publication. Everything now runs in your browser: nothing to install and nothing uploaded. Compared with the previous version:

More metrics
27 comparison metrics instead of 10, among them chance-corrected ones (Adjusted Mutual Information), Optimal-Match Accuracy, B-Cubed scores, Element-Centric Similarity, and the Omega Index and Overlapping NMI, which also compare overlapping clusters. Each metric has a one-line explanation next to it, and a "Recommended" preset helps choosing.
Guided workflow
A home page and three numbered steps: Load & prepare, Compare, Plots. When the loaded sets do not contain the same objects, VICTOR says so and offers the fix as one click.
Choose what to compare
Every pair of the selected sets, or each set against one reference such as a gold standard.
New plots
An UpSet plot of the objects the sets share, a ranking of the sets by average similarity, and a similarity map. The heatmap is now the default, since one bar per pair does not scale.
Interactive plots
Sankey and circos plots can show the objects flowing between clusters: click a cluster to follow its objects through every set. Networks have six layouts with zoom, pan and drag.
Networks
Several networks can be loaded. Besides conductance there are internal density, cut ratio, modularity and coverage, and a grid that scores every cluster set on every network.
Open in NORMA
The network and the clusters of every loaded set open in NORMA with one click, with nodes drawn as pie charts.
Export
Every plot as PNG, SVG, PDF, JPEG or WebP at up to six times the screen resolution, and every table as CSV.
API
Other programs can open VICTOR with their data and read the results back, by a link, by postMessage or through JavaScript. See the API tab.
Larger data
Files up to 50 MB instead of 1 MB. Half a million objects are compared in well under a second; metrics that are too costly for the loaded data are left out with a notice instead of stopping everything.
Everywhere
Works on phones, with a light and a dark theme, and eight bundled examples.

All ten metrics of the previous version are still there and give the same values.

What VICTOR does

VICTOR compares cluster sets: the results of different clustering algorithms, or of one algorithm with different parameters, on the same objects. It scores how similar every pair of results is and shows the scores as tables and plots. It does not run clustering itself and it does not pick a best result. Everything is calculated in your browser; your files are never sent anywhere.

File formats

Cluster set. A text file with one cluster per line and two tab-separated columns: the cluster name, then its members separated by commas. No header.

cluster1	F18,F22,F28,F32
cluster2	F05,F10,F14
cluster3	F06,F11

Network. An edge list with two columns (source, target) or three (plus a numeric weight), separated by tabs or spaces. Duplicate edges are merged with their weights summed and self-loops are dropped.

N1	N10	0.8
N2	N11	0.3

Preparing sets for comparison

The compared sets must contain identical objects. All metrics except the two for overlapping clusterings also need strict partitions, where each object is in exactly one cluster. When the selected sets differ in their objects, use the options in step 1 (Load & prepare); VICTOR also offers them as buttons when it detects the mismatch:

  • Cluster size range drops clusters that are too small or too large, for example singletons.
  • Intersection keeps only the objects that every selected set contains.
  • Superset keeps all objects and gives each set a singleton cluster for every object it lacks.

Comparison metrics

All 27 metrics are similarities: higher means more alike, and 1 means identical cluster sets. For a pair shown as "A vs B", the asymmetric metrics treat A as the reference. Below, n is the number of objects, mij the number of objects shared by cluster i of A and cluster j of B, H the entropy and I the mutual information.

Counting pairs

Adjusted Rand Index
Agreement on object pairs, corrected for chance. Around 0 for unrelated sets; can be negative.
Rand Index
Fraction of object pairs on which the two sets agree. Drifts towards 1 when there are many clusters, so prefer the adjusted version.
Fowlkes-Mallows Index
Geometric mean of the two Wallace criteria.
Jaccard Index
Pairs co-clustered in both sets, divided by pairs co-clustered in at least one.
Overlap Coefficient
Pairs co-clustered in both sets, divided by the smaller of the two sets' co-clustered pair counts.
Wallace Criterion 1 and 2
Probability that a pair co-clustered in A is also co-clustered in B (type 1), and the reverse (type 2). Asymmetric.

Set overlaps and matching

Maximum-Match Measure
Clusters are paired greedily by largest overlap; the matched overlaps are summed and divided by n.
F-Measure
Each cluster of A takes its best F-score, 2mij / (|Ai| + |Bj|), over the clusters of B; the scores are averaged weighted by cluster size. Asymmetric.
Optimal-Match Accuracy
Like the Maximum-Match Measure, but the one-to-one pairing of clusters is the best possible one (Hungarian algorithm) instead of a greedy one, so it is never lower. It equals 1 minus the classification error distance.
Purity (Meila-Heckerman)
Each cluster of A takes its largest overlap with a cluster of B; the overlaps are summed and divided by n. Asymmetric.
Van Dongen Measure
The Van Dongen distance, 2n minus the row maxima and the column maxima of the confusion matrix, divided by 2n and subtracted from 1.
B-Cubed Precision, Recall, F-Score
Per-object scores averaged over all objects. Precision: the share of an object's B cluster that is also in its A cluster. Recall: the share of its A cluster that is also in its B cluster. The F-Score is their harmonic mean. Precision and recall are asymmetric.
Element-Centric Similarity
Per-object score averaged over all objects (Gates et al. 2019). For strict partitions it is the number of objects sharing both of the object's clusters, divided by the size of the larger of the two. It is symmetric and never exceeds either B-Cubed precision or recall.

Mutual information

NMI by Strehl & Ghosh
I divided by the geometric mean of the two entropies.
NMI by Fred & Jain
I divided by the arithmetic mean of the two entropies. This is also the V-Measure.
NMI by the larger entropy
I divided by the larger of the two entropies; the strictest normalization.
Adjusted Mutual Information
I corrected for chance: (I − E[I]) / (mean entropy − E[I]), where E[I] is the value expected for random sets with the same cluster sizes. Prefer it to NMI when the compared sets have very different numbers of clusters.
Normalized Variation of Information
½(H(A|B)/H(A) + H(B|A)/H(B)), subtracted from 1.
Variation of Information
H(A) + H(B) − 2I, divided by its upper bound log n and subtracted from 1.
Variation of Information by joint entropy
The same distance divided by the joint entropy H(A,B) and subtracted from 1. Unlike the log n version it reaches 0 for independent sets of any size.
Homogeneity and Completeness
Homogeneity, I / H(A), is 1 when every cluster of B lies inside one cluster of A. Completeness, I / H(B), is 1 when every cluster of A lies inside one cluster of B. Together they show whether one set refines the other. Asymmetric.

Overlapping clusterings

These two are the only metrics that accept sets in which an object belongs to several clusters. When a selected set overlaps, only they are calculated. They also work on strict partitions.

Omega Index
The Adjusted Rand Index generalized to overlaps (Collins & Dent 1988): two sets agree on a pair of objects when the pair shares the same number of clusters in both; the agreement is corrected for chance. On strict partitions it equals the Adjusted Rand Index.
Overlapping NMI
The measure of Lancichinetti, Fortunato & Kertész (2009). Every cluster is treated as a yes/no property of the objects and is explained by its best-matching cluster in the other set; the remaining uncertainty is averaged over both directions and subtracted from 1. On strict partitions it is not equal to the ordinary NMI.

Plots

  • Heatmap (the default): all pairs in a grid, with rows and columns ordered by average-linkage hierarchical clustering so that similar sets sit together. The diagonal is left neutral. It stays readable with many sets.
  • Ranking: one bar per cluster set, its average similarity to all the others, with a line from its lowest to its highest value. Shows which result agrees most with the rest.
  • Map: every cluster set as a point, placed by multidimensional scaling (a classical start refined by stress minimization) so that the distances between points match one minus the similarity as closely as a plane allows. The note under the title says how faithfully they are reproduced. Methods such as UMAP or t-SNE are not used: they are built for hundreds of points and preserve neighbourhoods rather than distances, so with a handful of cluster sets their layout would mostly reflect their settings.
  • Pair bars: one bar per pair of cluster sets, sorted by similarity. Limited to the 30 most similar pairs when there are more.
  • Sankey: two views. Similarity of sets shows cluster sets as blocks joined by bands whose thickness is relative to the other pairs shown; hover a set to isolate its bands and drag it to rearrange. Objects between clusters shows every cluster as a block sized by its objects, one column per cluster set, with bands for the objects two clusters share: hover to highlight, click a cluster to follow its objects through every set, drag a cluster to reorder its column.
  • Network: cluster sets as nodes; thicker edges mean more similar sets. Choose between force-directed, concentric, circle, grid, tree and random layouts; scroll or pinch to zoom, drag the background to pan and drag nodes to move them.
  • Circos: two views. Similarity of sets shows cluster sets as arcs joined by ribbons shaded by similarity. Objects between clusters shows every cluster as an arc, grouped and coloured by its set, with ribbons for the objects that clusters of different sets share; hover an arc to isolate a cluster and click to keep it isolated.
  • UpSet (step 1): appears when the selected sets do not contain the same objects. Each column is a combination of sets, marked by the filled dots; its bar counts the objects found in exactly those sets and no others. The column with every dot filled is what the Intersection filter keeps.

"Hide below" removes the pairs whose similarity is under the chosen value. Every plot has an Export button that saves it as PNG, SVG, PDF, JPEG or WebP at up to six times the on-screen resolution, on a theme-coloured, white or transparent background.

Network quality

Load a network and choose a cluster set to see how well its clusters are separated on that network.

Conductance
Weight of the edges leaving the cluster, divided by the smaller of the cluster's volume and the rest of the network's volume (volume is the sum of weighted degrees). Closer to 0 is better.
Internal density
Edges inside the cluster divided by the number of possible edges inside it.
Cut ratio
Edges leaving the cluster divided by the number of possible edges between the cluster and the rest.
Modularity
How much more edge weight falls inside clusters than expected at random, for the whole cluster set. Network nodes outside every cluster count as singletons.
Coverage
Share of the total edge weight that lies inside clusters.

Citation

Karatzas E., Gkonta M., Hotova J., Baltoumas F.A., Kontou P.I., Bobotsis C.J., Bagos P.G., Pavlopoulos G.A. VICTOR: A visual analytics web application for comparing cluster sets. Computers in Biology and Medicine 135 (2021) 104557. doi:10.1016/j.compbiomed.2021.104557

Export image

Saves the plot as it looks now.

Format

.png