# align: Optimal Transport Alignment In OTclust: Mean Partition, Uncertainty Assessment, Cluster Validation and Visualization Selection for Cluster Analysis

## Description

This function aligns an ensemble of partitions with a reference partition by optimal transport.

## Usage

 `1` ```align(data) ```

## Arguments

 `data` – a matrix of horizontally stacked cluster labels. Each column contains cluster labels for all the data points according to one clustering result. The reference clustering result is put in the first column.

## Value

a list of alignment result.

 `distance` Wasserstein distances between the reference partition and the others. `numcls` the number of clusters for each partition. `statistics` average tightness ratio, average coverage ratio, 1-average jaccard distance. `cap` cluster alignment and points based (CAP) separability. `id` `cps` covering point set. `match` topological relationship statistics between the reference partition and the others. `Weight` weight matrix

## Examples

 ```1 2 3 4 5 6 7``` ```data(sim1) # the number of clusters. C = 4 # calculate baseline method for comparison. kcl = kmeans(sim1\$X,C) # align clustering results for convenience of comparison. compar = align(cbind(sim1\$z,kcl\$cluster)) ```

OTclust documentation built on May 6, 2019, 9 a.m.
{"ft_lang_label":"__label__en","ft_lang_prob":0.7577594,"math_prob":0.8624666,"size":959,"snap":"2019-35-2019-39","text_gpt3_token_len":207,"char_repetition_ratio":0.1277487,"word_repetition_ratio":0.05263158,"special_character_ratio":0.20959333,"punctuation_ratio":0.103225805,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9566004,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-21T18:12:53Z\",\"WARC-Record-ID\":\"<urn:uuid:07b6cfdd-a050-484a-ab76-3ef68decdf97>\",\"Content-Length\":\"62097\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1c0b54af-6e6c-45fe-be36-46796d07b6a0>\",\"WARC-Concurrent-To\":\"<urn:uuid:2907fbdd-59f3-46e2-84cd-8926dd65cf9c>\",\"WARC-IP-Address\":\"104.28.6.171\",\"WARC-Target-URI\":\"https://rdrr.io/cran/OTclust/man/align.html\",\"WARC-Payload-Digest\":\"sha1:BIFWEMKMTARSDJUOVHSIQNITBN7SANAF\",\"WARC-Block-Digest\":\"sha1:O3JP3EXAXJSSQ3OPM4SQZ76WOJ3EMXTS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514574588.96_warc_CC-MAIN-20190921170434-20190921192434-00070.warc.gz\"}"}