全部版块 我的主页
论坛 数据科学与人工智能 IT基础 JAVA语言开发
1397 3
2016-06-27
hclust

Hierarchical clustering algorithms in JavaScript

Installation

npm install ml-hclust

Methods

Generate a clustering hierarchy.

new agnes(data,[options])

AGNES (AGglomerative NESting): Continuously merge nodes that have the least dissimilarity.

Arguments

  • data: Array of points to be clustered, are an array of arrays, as [[x1,y1],[x2,y2], ... ]
  • options: Is an object with the parameters sim and kind, where sim is a distance function between vectors (the default function is the euclidean), and kind is the string name for the function to calculate distance between clusters, and it could be single(default), complete, average, centroid or ward
getDendogram([input])

Returns a phylogram (a dendogram with weights) and change the leaves values for the values in input, if it's given.

Example

var hclust = require('ml-hclust')var data = [[2,6], [3,4], [3,8]];var HC = new hclust.agnes(data);var dend1 = HC.getDendogram();var dend2 = HC.getDendogram([{a:1},{b:2},{c:3}]);
nClusters(N)

Returns at least N clusters based in the clustering tree if it's possible

new diana(data,[options])

DIANA (Divisive ANAlysis): The process starts at the root with all the points as one cluster and recursively splits the higher level clusters to build the dendrogram.

Arguments

  • data: Array of points to be clustered, are an array of arrays, as [[x1,y1],[x2,y2], ... ]
  • options: Is an object with the parameters sim and kind, where sim is a distance function between vectors (the default function is the euclidean), and kind is the string name for the function to calculate distance between clusters, and it could be single(default), complete, average, centroid or ward
getDendogram([input])

Returns a phylogram (a dendogram with weights) and change the leaves values for the values in input, if it's given.

Example

var hclust = require('ml-hclust')var data = [[2,6], [3,4], [3,8]];var HC = new hclust.diana(data);var dend1 = HC.getDendogram();var dend2 = HC.getDendogram([{a:1},{b:2},{c:3}]);
nClusters(N)

Returns at least N clusters based in the clustering tree if it's possible

new birch(data,[options])

BIRCH (Balanced Iterative Reducing and Clustering using Hierarchies): Incrementally construct a CF (Clustering Feature) tree, a hierarchical data structure for multiphase clustering

new cure(data,[options])

CURE (Clustering Using REpresentatives):

new chameleon(data,[options])

CHAMELEON

Test$ npm install$ npm test
AuthorsLicense

MIT


本帖隐藏的内容

hclust-master.zip
大小:(9.5 KB)

 马上下载



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2016-6-27 00:17:34

DIANA (Divisive ANAlysis) using JavaScript

复制代码


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-6-27 00:18:01

AGNES (AGglomerative NESting)

复制代码


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-6-27 00:20:40
复制代码
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群