Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manuel-lang/learning-to-link
Finding the best linkage strategy for bottom up clustering algorithms - ICLR 2020.
https://github.com/manuel-lang/learning-to-link
algorithm-selection clustering clustering-algorithms data-driven iclr2020 metric-learning
Last synced: 2 days ago
JSON representation
Finding the best linkage strategy for bottom up clustering algorithms - ICLR 2020.
- Host: GitHub
- URL: https://github.com/manuel-lang/learning-to-link
- Owner: manuel-lang
- Created: 2019-06-30T21:40:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-16T02:01:54.000Z (almost 3 years ago)
- Last Synced: 2023-03-24T05:37:27.964Z (over 1 year ago)
- Topics: algorithm-selection, clustering, clustering-algorithms, data-driven, iclr2020, metric-learning
- Language: C++
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Learning-to-Link
This repository contains the source code for the paper `Learning to Link` by Maria-Florina Balcan, Travis Dick and Manuel Lang.
We solve the problem of finding the best linkage strategy for bottom up clustering algorithms. Also, we learn a weighted
combination of metrics to find the best feature representation of the given dataset.## Contributors
- [Travis Dick](https://github.com/TravisBarryDick)
- [Manuel Lang](https://github.com/manu183)## Running the code
We provide two scripts for running the experiments, one for the algorithm selection and the other for learning the metric.
To create the executables, please use the CMakeLists.txt by running `cmake .` and `make` in the root directory.### Algorithm selection
```
./AlphaLinkage
```You can use the following command line arguments.
| Argument | Description |
| ------------- | ------------- |
| --help | Display usage options |
| --batch | Select the n-th set of the given number of points for each class|
| --folder | Evaluate all csv files in the given folder |
| --input | Evaluate the given csv file |
| --job | Create an MNIST job (e.g. --job 0 will run labels 0,1,2,3,4)|
| --labels | Select the CSV encoded labels only (e.g. --labels 1,2,4)|
| --majority | Use Majority distance instead of Hamming distance|
| --noaverage | Directly output the results without averaging them over multiple files|
| --output | Path where the result will be stored|
| --points | Number of points used for each class|
| --verbose | Output the ranges to the console|
| --averagecomplete | (Default) Interpolate between average and complete linkage|
| --singleaverage | Interpolate between single and average linkage|
| --singlecomplete | Interpolate between single and complete linkage|Example:
```
./AlphaLinkage --input ./input.csv --output ./output.csv --points 200 --singlecomplete
```
This command will read 200 points for each class from the file `input.csv`, interpolate between single and complete linkage, and output the results to `output.csv`.### Optimizing the Metric
```
./DistanceLearning
```The parameter string is a list of the four following characters.
| Index | Description |
| ------------- | ------------- |
| 1 | Cost function: 'm' for Majority or 'h' for Hamming cost |
| 2 | Linkage type: 's' for single linkage or 'c' for complete linkage|
| 3 | File type of the first file: 'd' for distance matrix, 'c' for cosine distance (raw features) or 'e' for the Euclidean distance (raw features) |
| 4 | File type of the second file: 'd' for distance matrix, 'c' for cosine distance (raw features) or 'e' for the Euclidean distance (raw features) |Example:
```
./DistanceLearning hcee input1.csv input2.csv
```This example loads the two files `input1.csv` and `input2.csv`, learns the best metric using complete linkage and the Hamming cost, and output the results to the console. The pointwise distances are calculated using the Euclidean distances in both cases.