This repository includes a Java implementation of the algorithms proposed in the thesis "A Local-Search Approach to Silhouette-Based Clustering" of Peressoni and supervisors Pietracaprina, Pucci, Vandin and Sarpe (https://thesis.unipd.it/handle/20.500.12608/40252).
Requirements:
openjdk17
- Put datasets in
datasets
folder (see below) - Set up the desired experiments in
app/src/main/java/silopt/App.java
(in themain
method) - Run
./gradlew run
The results will be printed on stdout
, while some logging will be printed on
stderr
. To collect them into two files you can run in bash:
{ ./gradlew run | tee results.stdout; } 2> >(tee results.stderr)
and in fish:
begin; ./gradlew run | tee results.stdout; end 2>| tee results.stderr
The datasets have to be added into datasets
folder, in the main dir. Each
dataset is a file with extension .data
, which is indeed a csv. Each row
represents a point, which components are comma separated.
silopt.Sil
: utilities to compute silhouette and approximated silhouettesilopt.Bernoulli
: implements a Bernoulli distributed random generator, based on MersenneTwister random generator- Clustering
silopt.Clustering.Clustering
: represents a clustering of a set of pointssilopt.Clustering.Cluster
: a cluster in a clustering- Points
silopt.Clustering.Point
: interface for generic pointssilopt.Clustering.CartesianVector
: a vector in a real spacesilopt.Clustering.CartesianPoint
: abstract point in a real spacesilopt.Clustering.EuclideanPoint
: point in real space with Euclidean distancesilopt.Clustering.ManhattanPoint
: point in real space with Manhattan distance
- Algorithms
silopt.Optimizable
: abstract for generic optimization algorithms on clusteringsilopt.KMeansPP
: optimizable implementing k-means++silopt.Lloyd
: optimizable implementing Lloyd's algorithmsilopt.PAM
: optimizable implementing PAMsilopt.LocalSearch
: contains optimizables implementing the local-search algorithms proposed in the thesissilopt.LocalSearch.ExactMemoization
silopt.LocalSearch.ApproxMemoization
silopt.LocalSearch.ExactCoresetMemoization
silopt.LocalSearch.ApproxCoresetMemoization
silopt.LocalSearch.SampleOpt