在自定义对象上使用ELKI并使结果有意义 [英] Using ELKI on custom objects and making sense of results

查看:97
本文介绍了在自定义对象上使用ELKI并使结果有意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用我有一组需要集群的对象(我自己的类型).为此,我在聚类之前将它们转换为特征向量.

I have a set of objects (of my own type) that need to be clustered. For that, I convert them to feature vectors before clustering.

这是我目前如何运行它并产生一些结果的方法(代码在Scala中):

This is how I currently got it to run and produce some result (code is in Scala):

val clusterer = new SLINK(CosineDistanceFunction.STATIC, 3)
val connection = new ArrayAdapterDatabaseConnection(featureVectors)
val database = new StaticArrayDatabase(connection, null)
database.initialize()

val result = clusterer.run(database).asInstanceOf[Clustering[_ <: Model]]

现在,结果是一个Clustering,其中包含Model类型的元素.我可以输出它们,但是我不知道如何理解这个结果,尤其是因为SLINK返回的类型似乎不是参数化的DendrogramModel模型.

Now, the result is a Clustering that contains elements of type Model. I can output them, but I don't know how to make sense of this result, especially since SLINK returns models of type DendrogramModel which does not seem to be parametrizable.

具体来说,如何将结果链接回我的原始元素(之前创建变量featureVectors的元素)?

Specifically, how can I link the results back to my original elements (the ones from which I created the variable featureVectors earlier)?

我假设我需要创建某种自定义模型,或者通过初始化和执行算法以从结果中检索出来,以某种方式维护与原始元素的某种链接.不过,我找不到从哪里开始.

I assume I need to create some kind of custom model or somehow maintain some link to the original elements through initialization and execution of the algorithm to retrieve from the result. I cannot find where to get started on this though.

我知道不建议将ELKI嵌入到自己的程序中.但是,似乎以其他方式调用ELKI并没有什么不同:我需要在程序运行期间对结果进行聚类并将其映射回我的对象​​.

I am aware that embedding ELKI into own programs is discouraged. However, it seems that calling ELKI in some other way would not be any different: I need to cluster and map the results back to my objects during runtime of my program.

推荐答案

DendrogramModel不包括集群中的对象.模型是集群上的其他数据.

The DendrogramModel does not include the objects in the cluster. Models are additional meta data on the clusters.

使用

Use the getIDs() method to access the members of a Cluster instance.

这篇关于在自定义对象上使用ELKI并使结果有意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆