maxleonov/cakephp-clope-clustering-plugin

Cake-PHP插件,用于CLOPE聚类算法

安装: 16

依赖: 0

建议者: 0

安全: 0

星标: 2

关注者: 3

分支: 1

类型:cakephp-plugin

1.0.2 2014-03-07 18:06 UTC

This package is not auto-updated.

Last update: 2024-09-28 15:44:29 UTC


README

Cake-PHP插件,用于CLOPE聚类算法

安装

cd my_cake_app/app
git clone git://github.com/maxleonov/cakephp-clope-clustering-plugin.git Plugin/ClopeClustering

在Config/bootstrap.php中添加插件加载

CakePlugin::load('ClopeClustering');

docs/Database/database.sql添加表

用法

$Clope = ClassRegistry::init('ClopeClustering.Clope');

$params = array(
  'repulsion' => 2.0,
);
  
$transactions = array(
  array('a1', 'a2', 'a3'),
  array('a1', 'a2', 'a3', 'a4'),
  array('a1', 'a2', 'a3', 'a4'),
  array('a5', 'a6', 'a7'),
  array('a5', 'a6', 'a7'),
  array('a8', 'a9', 'a10')
);  

$Clope->clusterize($transactions, $params);