Co-clustering softwares

The first co-clustering software is the Co-cluster developed at University of Austin, Texas. The software you can download here is the version 1.1 you can find also at the original web page.

The package hosted here includes a patch to allow the software compilation also with gcc 4.0 and so on modern Linux and Mac OS X systems. Furthermore, it also contains some bash scripts (*.sh) to analyze co-clustering results and produce clustering quality measures with respect to labeled datasets.

The original software is released under GPL license, and so is this.

Download

Co-clustering code


The original version of the second Co-clustering software is available here and it implements all the six approximation schemes for the Co-clustering, both for the Euclidean distance and for I-divergence.

The package hosted here includes also the same bash scripts included in the aforesaid Co-cluster package.

No license informations were included into the original Bregman co-clustering package, but it seems to be a fork of the Co-cluster software v. 1.0. The latter was released under GPL license, so the code of the Bregman co-clustering should be under the same license.

Download

Bregman Co-clustering code

Bregman divergences, SVMs and possible implications

In order to find a connection between the works studied (Bregman Co-clustering and Support Vector Clustering) we have performed some research. An interesting result are the following paper:

The above paper generalizes the Minimum Enclosing Ball (MEB) problem to the Bregman divergences and also provide a generalization of the Bâdoiu-Clarkson (BC) approximation algorith. This is the same algorithm exploited in practical by the Core Vector Machines

CVMs reformulate the SVMs as a MEB problem. Since they use the BC algorithm and such an algorithm has been generalized to the Bregman divergences, the research on vector machines could have interesting implications.

Induced Missing Values Experiments – Stage 2

This is the continuation of the experiments started few days ago.

Two other datasets have been involved in this type of experiments. Both of them are Astrophysics datasets, more precisely two dataset containing Stars and Galaxies.

Star/Galaxies separation is a problem usually tackled with supervised learning methodologies. In our work several clustering testes are conducted on such type of data.

These two datasets was chosen to be quite simple to separate, because we are interested in the robustness with respect missing values.

Starting from the original datasets, I have created eight variants for each of them, in this way

  • 4 variants affecting only 3 features out of 15, with 5, 10, 20, 30 percent of objects reporting missing values for all of the 3 features, respectively
  • 4 variants affecting 6 features out of 15, with 5, 10, 20, 30 percent of objects reporting missing values for all of the 6 features, respectively

The experiments was done with Euclidean Co-clustering (Information-theoretic cannot work with negative values) and SVC.

An archive with all results is available for download (it contains also the results of the previous stage).

In the files above:

- “MVâ€? stands for “Missing Valuesâ€?
- “FCâ€? stands for “Feature Clustersâ€?
- FC1 means no feature clustering
- FC2 means two clusters of feature requested
- FC3 means three clusters of feature requested
- CC stands for Co-clustering

Induced Missing Values Experiments – Stage 1

Few days ago I made ready a tool to induce pseudo-random missing values within datasets. This tool allow us to test the robustness of both Bregman Co-clustering and SVC with respect to missing values.

The tool accepts two parameters: the fraction of objects that will be affected by the process, and the list of features involved.

As is my custom, I started this series of experiments with the IRIS data. So, I created these IRIS dataset variants

- IRIS 5a: 5% of objects with missing values. One feature (#3) involved.
- IRIS 5b: 5% of objects with missing values. Two features (#3, #4) involved.
- IRIS 10a: 10% of objects with missing values. One feature (#3) involved.
- IRIS 10b: 10% of objects with missing values. Two features (#3, #4) involved.
- IRIS 20a: 20% of objects with missing values. One feature (#3) involved.
- IRIS 20b: 20% of objects with missing values. Two features (#3, #4) involved.
- IRIS 30a: 30% of objects with missing values. One feature (#3) involved.
- IRIS 30b: 30% of objects with missing values. Two features (#3, #4) involved.

We recall the IRIS data have 4 features.

Here you can download the results.

The experiments was done with Co-clustering and SVC. Information-theoretic co-clustering results are not in the files above, because they were irrelevant (very poor performance).

In the files above:

- “MV” stands for “Missing Values”
- “FC” stands for “Feature Clusters”
- FC1 means no feature clustering
- FC2 means two clusters of feature requested.
- CC stands for Co-clustering

High dimensionality: Co-clustering + SVC

Uno degli obiettivi di tesi è avere buone prestazioni su high dimensional dataset. L’altro è quello di poter combinare le due tecniche studiate in maniera concreta e con buoni risultati.

Il test illustrato di seguito coinvolte entrambi i punti.

Il dataset coinvolto è stato l’Internet Advertisement dall’UCI repository of Machine Learning. Ne cito la descrizione

This dataset represents a set of possible advertisements on Internet pages. The features encode the geometry of the image (if available) as well as phrases occuring in the URL, the image’s URL and alt text, the anchor text, and words occuring near the anchor text. The task is to predict whether an image is an advertisement (“ad”) or not (“nonad”).

Number of Instances: 3279 (2821 nonads, 458 ads)
Number of Attributes: 1558

One or more of the first three features are missing in 28% of the instances.

Trattiamo dunque con un dataset in 1558D che possiede tra l’altro dei missing values.

Co-clustering

Il test effettuato col solo Co-clustering mette in evidenza i vantaggi dell’implicita capacità di questa tecnica di ridurre la dimensionalità effettuando feature clustering contestuale al data clustering.

Effettuando il test con lo schema 5 e la distanza euclidea, senza richiedere feature clustering, si ottiene quanto segue

Class 1
TP: 223 FP: 98
FN: 223 TN: 2735
Class 2
TP: 98 FP: 223
FN: 98 TN: 2860

Class 1 – Precision: 69.47% Recall: 50% F1: 58.148%
Class 2 – Precision: 30.53% Recall: 50% F1: 37.912%

Accuracy: 9.79%

Stesso schema, ma con feature clustering (10 cluster di feature richiesti), dà luogo a quanto segue

Class 1
TP: 223 FP: 98
FN: 236 TN: 2722
Class 2
TP: 2722 FP: 236
FN: 98 TN: 223

Class 1 – Precision: 69.47% Recall: 48.584% F1: 57.18%
Class 2 – Precision: 92.022% Recall: 96.525% F1: 94.22%

Accuracy: 89.814%

La riduzione della dimensionalità ha dato i suoi frutti (ricordiamo che il dataset possiede anche missing values)

SVC

Le risorse computazionali a disposizione insieme con la natura ancora non stabile del software sviluppato per il SVC non ha permesso di effettuare il test del SVC direttamente in 1558D. Ad ogni modo la letteratura riporta un forte degrado di prestazioni all’aumentare delle dimensioni dello spazio vettoriale, poiché allo stesso tempo si rende necessario un numero elevato di SV per la descrizione del contorno dei cluster.

Inoltre la letteratura mostra anche come la PCA perda di efficacia quando si necessita di un certo numero di componenti.

Co-clustering + SVC

Sappiamo che il Co-clustering, durante il processo di clustering, calcola una approssimazione della matrice di dati originale.

Pertanto, abbiamo usato il Co-clustering richiedendo un co-clustering di dimensioni 3279 x 3, ovvero abbiamo richiesto un numero di cluster di riga pari al numero di righe (quindi il numero di oggetti) e un numero di cluster di colonna considerevolmente inferiore al numero di colonne originale (3 feature clusters invece di 1558 features).

Così facendo il Co-clustering calcola una matrice di approssimazione dove ogni riga rappresenta ancora un solo oggetto della matrice originale, ma a differenza dell’originale, questa matrice è in 3D.

Ricordiamo inoltre che il processo di approssimazione genera una matrice priva di missing values.

Abbiamo così preso tale matrice approssimata e usata come input del SVC. Il risultato è stato addirittura superiore (anche se non di molto) al massimo ottenuto col Co-clustering

Class 0
TP: 218 FP: 70
FN: 241 TN: 2750

Precision: 75.6944 – Recall: 47.4946 – F1: 58.3668

Class 1
TP: 2750 FP: 241
FN: 70 TN: 218

Precision: 91.9425 – Recall: 97.5177 – F1: 94.6481

Accuracy: 90.5154

Tempo macchina

È importante notare che SVC ha impiegato soltanto 0.06 secondi in totale per concludere il processo, trovando il giusto valore di Kernel Width al secondo ciclo. Il Co-clustering ha invece impiegato 117 secondi a concludere il processo (ricordiamo completo anche della sua parte di clustering e non solo del calcolo della matrice approssimata, poiché allo stato attuale il software non permette di scindere le due operazioni).

Abbiamo dunque un totale di 117.06 secondi.

L’SVC su un dataset di 3000 elementi in 20 dimensioni ha impiegato circa 400 secondi per compiere due cicli. E il tempo impiegato cresce all’aumentare delle dimensioni e anche coll’avanzare dei cicli, poiché valori più alti di Kernel Width rallentano il processo di domain description. È facile dunque capire come si potrebbe comportare il solo SVC con un dataset di 1558D.

Conclusioni

Altri test simili erano stati effettuati su dataset troppo piccoli per avere dei risultati significativi.
Questo test mostra come è possibile combinare le due tecniche, sfruttando la capacità di ridurre la dimensionalità e di trattare i missing values dell’uno, e l’accuratezza, la gestione degli outliers e dei cluster di forma arbitraria dell’altro.

Altri test saranno successivamente condotti.

Co-clustering – Missing Values Experiments

Data la complessità nell’eseguire gli esperimenti con il Co-clustering e al fine di eseguire dei test ben ponderati, ho oggi deciso di eseguire dei test su dataset di dimensioni ridotte per capire la linea da seguire su dataset più complicati.

In riferimento agli esperimenti preliminari già eseguiti, ancora una volta oggetto dei test è l’IRIS data set.

Il test in questione è stato eseguito con lo Squared Euclidean Co-clustering. Nei test preliminari, con tale istanza di Co-clustering si era raggiunta un’accuratezza che oscillava tra l’88% e l’89%.

Nel test di oggi sono stati introdotti missing values nell’IRIS dataset, secondo una politica casuale.

Data la matrice di dati rappresentate il dataset (150 oggetti x 4 attributi), sono stati introdotti, nell’ordine, prima il 5, poi il 10 e poi il 20 per cento di missing values.

Nel primo caso l’accuratezza è stata del 88.667%, praticamente immutata.
Nel secondo caso l’accuratezza è stata del 84%.
Nel terzo caso l’accuratezza è stata del 81%.

Considerando la perdita di informazione introdotta, il Co-clustering ha fornito ugualmente risultati rispettabili, con una perdita di accuratezza non lineare rispetto al numero di missing values introdotti.

In giornata eseguirò altri test simili, per poi ritornare sul Pandora Dataset del prof. Longo e infine passare su un dataset di documenti testuali, come Reuters.

Pandora: nuovi risultati

Impegni di lavoro non mi hanno permesso di lavorare al 100% sul test del Pandora Dataset, che data la mole di dati che produce a ogni test, ha necessitato, tra l’altro, la scrittura di strumenti di analisi, seppur abbastanza grezzi, per il momento.

Ad ogni modo, ciò che è possibile fornire allo stato attuale delle cose è il numero di oggetti per cluster, sia nel caso di “Pandora depurato” sia nel caso di “Pandora originale”. Il numero di cluster richiesti in entrambi i casi è stato 21, numero che dovrebbe essere un’ottima stima della realtà, in seguito ai ripetuti test effettuati per stimare appunto tale numero. Ad ogni modo, ripeto ancora una volta, l’obiettivo primario di questi test è assicurare un comportamento stabile del Co-clustering in presenza di oggetti con missing values. Un raffinamento della stima dei cluster potrà essere ottenuto, ad esempio, applicando relative criteria per la valutazione dei risultati (vedere prima bozza tesi)

Di seguito si fa riferimento all’ Information-Theoretic Co-clustering.

Co-clustering di “Pandora depurato” – Richiesti 21 Cluster

2724
5840
8064
8365
11825
12340
15119
15591
18449
19838
20086
22064
23863
25575
26577
26650
28016
30956
33215
40045
40746
435948 tot

Co-clustering di “Pandora originale” – Richiesti 21 Cluster

666
5176
5999
9961
13076
13336
14091
16104
17879
18135
19523
20632
23703
25933
30699
31505
32621
33934
35085
38781
42432
449271 tot (i 13304 oggetti in più sono quelli riportanti missing values)

Di seguito si fa riferimento al Minimum Sum Squared Co-clustering (v. II)

Co-clustering di “Pandora depurato” – Richiesti 21 Cluster

2427
3375
8471
10682
11176
11521
11702
12682
13262
15596
16760
19127
20744
20886
24549
28716
29123
30408
38123
41477
65141
435948 tot

Co-clustering di “Pandora originale” – Richiesti 21 Cluster

1106
1441
2288
3350
3597
5492
8232
8329
13267
16174
19508
19696
21329
23955
24489
26848
29635
41147
55983
56935
66470
449271 tot

Si sta sviluppando un ulteriore strumento di analisi, per l’analisi incrociata dei cluster.
Dato che il Co-clustering non produce i cluster sempre nello stesso ordine, è necessario un’analisi più complessa degli stessi per calcolare una misura di quanto il co-clustering sia rimasto stabile.

Inoltre si stanno riconducendo i test richiedendo 20 cluster, perché dagli ultimi test con 21 cluster, pur non essendoci cluster vuoti, è risultato in media, su 20 iterazioni, 1 cluster singleton.