zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    面向对象课程设计-FlappyCharacter(个人)
    学生成绩管理系统——个人博客
    学生成绩管理系统(个人)
    JAVA课程设计个人博客----FlappyBird
    Java课程设计——彩票购买抽奖系统
    彩票抽奖程序—个人博客
    彩票购买抽奖程序——个人博客
    面对对象综合设计-贪吃蛇个人博客
    面向对象综合设计-贪吃蛇
    面向对象程序综合设计—课程设计
  • 原文地址:https://www.cnblogs.com/1zhangwenjing/p/9133777.html
Copyright © 2011-2022 走看看