• Affinity Propagation


    1. 调用方法:

    AffinityPropagation(damping=0.5max_iter=200convergence_iter=15copy=Truepreference=Noneaffinity=’euclidean’verbose=False)

    参数:

    damping : float, optional, default: 0.5       防止更新过程中数值震荡

    max_iter : int, optional, default: 200

    convergence_iter : int, optional, default: 15  

      如果类簇数目在达到这么多次迭代以后仍然不变的话,就停止迭代。

    copy : boolean, optional, default: True  

      Make a copy of input data.

    preference : array-like, shape (n_samples,) or float, optional

      每个points的preference。具有更大preference的点更可能被选为exemplar。类簇的数目受此值的影响,如果没有传递此参数,它们         会被设置成input similarities的中值。???

    affinity : string, optional, default=``euclidean``

      度量距离的方式,推荐precomputed and euclidean这两种,euclidean uses the negative squared euclidean distance       between points.

    verbose : boolean, optional, default: False

    属性:

    cluster_centers_indices_ : array, shape (n_clusters,)

      类簇中心的索引

    cluster_centers_ : array, shape (n_clusters, n_features)

      类簇中心 (if affinity != precomputed)

    labels_ : array, shape (n_samples,)

      每个point的标签

    affinity_matrix_ : array, shape (n_samples, n_samples)

      Stores the affinity matrix used in fit.

    n_iter_ : int

      达到收敛需要的迭代次数。

    2. scikit-learn介绍

    http://scikit-learn.org/stable/modules/clustering.html#affinity-propagation

    3. 算法复杂性

    ,与样本数成正比。

    4.算法描述

     

     引入阻尼因子:

    如有疑问请联系我,写的不对的地方请联系我进行更改,感谢~ QQ:1968380831
  • 相关阅读:
    jmeter单一接口测试
    mac os下载安装jmeter
    十、集成使用redis
    Java之Poi导出Excel文档
    134. Gas Station (Array; DP)
    53. Maximum Subarray (Array; DP)
    36. Valid Sudoku (Array; HashTable)
    37. Sudoku Solver (Array;Back-Track)
    52. N-Queens II (Array; Back-Track)
    51. N-Queens (Array; Back-Track, Bit)
  • 原文地址:https://www.cnblogs.com/1zhangwenjing/p/9133777.html
Copyright © 2020-2023  润新知