Compute the CDBW validity index

cdbw的Python项目详细描述


CDBW

计算s-dbw有效性指数
s_dbw有效性指数由公式定义:

cdbw=密实度*凝聚力*分离度

最高值->;更好的群集。


安装:

pip install --upgrade cdbw

用法:

fromcdbwimportCDbwscore=CDbw(X,labels,metric="euclidean",alg_noise='comb',intra_dens_inf=False,s=3,multipliers=False)

参数:

X : array-like, shape (n_samples, n_features)
    List of n_features-dimensional data points. Each row corresponds
    to a single data point.
labels : array-like, shape (n_samples,)
    Predicted labels for each sample.  (-1 - for noise)
metric : str,
    The distance metric, can be ‘braycurtis’, ‘canberra’, ‘chebyshev’, ‘cityblock’, ‘correlation’,
    ‘cosine’, ‘dice’, ‘euclidean’, ‘hamming’, ‘jaccard’, ‘kulsinski’, ‘mahalanobis’, ‘matching’, ‘minkowski’,
    ‘rogerstanimoto’, ‘russellrao’, ‘seuclidean’, ‘sokalmichener’, ‘sokalsneath’, ‘sqeuclidean’, ‘wminkowski’,
    ‘yule’.
alg_noise : str,
    Algorithm for recording noise points.
    'comb' - combining all noise points into one cluster (default)
    'sep' - definition of each noise point as a separate cluster
    'bind' -  binding of each noise point to the cluster nearest from it
    'filter' - filtering noise points
intra_dens_inf : bool,
    If False (default) CDbw index = 0 for cohesion or compactness - inf or nan.
s : int,
    Number of art representative points. (>2)
multipliers : bool,
    Format of output. False (default) - only CDbw index, True - tuple (compactness, cohesion, separation, CDbw)

返回:

cdbw : float,
    The resulting CDbw validity index.

参考文献:

  1. M.Halkidi和M.Vazirgiannis,“基于密度的多代表聚类有效性方法” 模式识别字母29(2008)773–786

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
maven通过pom文件增加最大java堆大小   java如何在Kojo IDE输出窗格中打印到同一行?   如何使用特定的JRE交付Java应用程序?   java Cordova插件调用日志找不到符号   Java上Redis哈希中的spring列表   java ThreadSafeClientConnManager不是多线程   java如何在激活器中获取IEclipseContext   java如何通过编程更改除法器偏差   在中找不到maven Java/Mvn本地资源。罐包装   JOptionPane的java用户输入验证。showInputDialog   java编辑:如何更改日期对象的日期格式?   文件编写器Java;如何覆盖   一行中包含多个值的java读取属性   java如何在安卓中使用截击上传视频