## Sklearn - Affinity propagation

Perform Affinity Propagation Clustering of data.

sklearnclusteringAP

true

#### Classification(s)

Method-focused categoriesData-perspectiveGeoinformation analysis

#### Detailed Description

English {{currentDetailLanguage}} English

AffinityPropagation creates clusters by sending messages between pairs of samples until convergence. A dataset is then described using a small number of exemplars, which are identified as those most representative of other samples. The messages sent between pairs represent the suitability for one sample to be the exemplar of the other, which is updated in response to the values from other pairs. This updating happens iteratively until convergence, at which point the final exemplars are chosen, and hence the final clustering is given.

Affinity Propagation can be interesting as it chooses the number of clusters based on the data provided. For this purpose, the two important parameters are the preference, which controls how many exemplars are used, and the damping factor which damps the responsibility and availability messages to avoid numerical oscillations when updating these messages.

The main drawback of Affinity Propagation is its complexity. The algorithm has a time complexity of the order O(N**2T) O(N2T), where N N is the number of samples and TT is the number of iterations until convergence. Further, the memory complexity is of the order O(N**2)O(N2) if a dense similarity matrix is used, but reducible if a sparse similarity matrix is used. This makes Affinity Propagation most appropriate for small to medium sized datasets.

Examples:

Algorithm description: The messages sent between points belong to one of two categories. The first is the responsibility r(i,k)r(i,k), which is the accumulated evidence that sample k should be the exemplar for sample i should be the exemplar for sample i. The second is the availability a(i,k) which is the accumulated evidence that sample i should choose sample k to be its exemplar, and considers the values for all other samples that k should be an exemplar. In this way, exemplars are chosen by samples if they are (1) similar enough to many samples and (2) chosen by many samples to be representative of themselves.

More formally, the responsibility of a sample k to be the exemplar of sample i is given by:

Where s(i,k) is the similarity between samples i and k. The availability of sample k to be the exemplar of sample i is given by:

To begin with, all values for rr and a are set to zero, and the calculation of each iterates until convergence. As discussed above, in order to avoid numerical oscillations when updating the messages, the damping factor λ
is introduced to iteration process:

where t indicates the iteration times.

#### {{htmlJSON.HowtoCite}}

Jie Song (2021). Sklearn - Affinity propagation, Model Item, OpenGMS, https://geomodeling.njnu.edu.cn/modelItem/958c228c-2c60-4596-a1c3-d67087b7da3d

#### QR Code

• {{curRelation.name}}
{{curRelation.name}}

{{curRelation.overview}}
{{curRelation.author.join('; ')}}
{{curRelation.journal}}

{{htmlJSON.RelatedItems}}
{{props.row.name}}

{{htmlJSON.LinkResourceFromRepositoryOrCreate}}{{htmlJSON.create}}.

{{ props.row.overview }}
{{ props.row.overview }}
Drop the file here, orclick to upload.
File size should not exceed 10m.
Select From My Space
+ add

{{htmlJSON.authorshipSubmitted}}

Cancel Submit
{{htmlJSON.Cancel}} {{htmlJSON.Submit}}
{{htmlJSON.Localizations}} + {{htmlJSON.Add}}
{{ item.label }} {{ item.value }}
{{props.row.localName}}
{{htmlJSON.ModelName}}:
{{htmlJSON.Cancel}} {{htmlJSON.Submit}}
模型名称
名称 别名 {{tag}}

模型版本
系列名 版本号 目的 修改内容 创建/修改日期 作者

描述信息
摘要 详细描述

{{tag}}
* 时间参考系
* 空间参考系类型 * 空间参考系名称

开发信息
起始日期 终止日期 进展 开发者

* 是否开源 * 访问方式 * 使用方式 开源协议 * 传输方式 * 获取地址 * 发布日期 * 发布者

元数据版本
编号 目的 修改内容 创建/修改日期 作者
{{index+1}}

{{index+1}}

{{index+1}}

模型类型

分类信息

时间分辨率 时间尺度 时间步长 时间范围 空间维度 格网类型 空间分辨率 空间尺度 空间范围
{{tag}}
* 类型
图例

* 名称 * 描述
上传

示例描述 * 名称 * 类型 * 值/链接 上传

{{htmlJSON.Cancel}} {{htmlJSON.Submit}}
Title Author Date Journal Volume(Issue) Pages Links Doi Operation
{{htmlJSON.Cancel}} {{htmlJSON.Submit}}
{{htmlJSON.Add}} {{htmlJSON.Cancel}}

#### {{articleUploading.title}}

Authors:  {{articleUploading.authors[0]}}, {{articleUploading.authors[1]}}, {{articleUploading.authors[2]}}, et al.

Journal:   {{articleUploading.journal}}

Date:   {{articleUploading.date}}

Page range:   {{articleUploading.pageRange}}

Link:   {{articleUploading.link}}

DOI:   {{articleUploading.doi}}

Yes, this is it Cancel

The article {{articleUploading.title}} has been uploaded yet.

OK
{{htmlJSON.Cancel}} {{htmlJSON.Confirm}}
Model Classifications 1
Model Classifications 2
Title Author Date Journal Volume(Issue) Pages Links Doi Operation

#### NEW

Name:
Affiliation:
Email:
Homepage:
Upload cancel

#### {{articleUploading.title}}

Authors:  {{articleUploading.authors[0]}}, {{articleUploading.authors[1]}}, {{articleUploading.authors[2]}}, et al.

Journal:   {{articleUploading.journal}}

Date:   {{articleUploading.date}}

Page range:   {{articleUploading.pageRange}}

Link:   {{articleUploading.link}}

DOI:   {{articleUploading.doi}}

Yes, this is it Cancel

The article {{articleUploading.title}} has been uploaded yet.

Confirm
{{htmlJson.path}}
:
/{{path.name}}
search results of '{{searchContentShown}}'

#### No content to show

{{item.name}}

.

{{item.suffix}}

.{{item.suffix}}

{{htmlJson.Max}}: {{toDecimal1(capacity/1073741824)}} GB
Download
Copy
Delete
Link
Rename
/{{path.label}}
{{htmlJson.Change}}
/{{path.name}}
{{htmlJson.SelectFile}}
{{htmlJson.Cancel}} {{htmlJson.Confirm}}
{{htmlJson.path}}
:
/{{path.name}}
/..
{{htmlJson.Cancel}} {{htmlJson.Confirm}}
{{ data.name }}
##### You have select  {{multipleSelection.length+multipleSelectionMyData.length}} data .
• My Uploaded Data
• Output Data
• {{item.computableName}}@{{formatDate(item.runTime)}}
{{scope.row.type}}
{{ scope.row.tag }}
Download
• Fork Data
{{it.category}}

#### NEW

Name:
Affiliation:
Email:
Homepage:
previous next conform
{{htmlJSON.ModelClassifications}}

{{htmlJson.LinkRelatedFromRepositoryOrCreate}}.    {{htmlJson.CreateNew}}>

{{htmlJson.RelatedItems}}
{{ props.row.overview }}
{{ props.row.overview }}
{{htmlJson.Cancel}} {{htmlJson.OK}}
Localizations + Add
{{ item.label }} {{ item.value }}
{{props.row.localName}}
Model Name :

#### Comment(s)

{{replyTo}} Submit
{{comment.date}}
{{comment.content}}
{{subComm.author.name}} {{htmlJson.ReplyTo}}
{{subComm.date}}
{{subComm.content}}
EN
中文