使用ELKI的距离功能 [英] Using ELKI's Distance Function

查看:129
本文介绍了使用ELKI的距离功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是来自上一个问题的后续行动,在这里我们评论说,使用带有lat,long坐标的欧几里得距离不会产生正确的结果. 我在文档中读到 ELKI启用了地理数据,即距离函数,存在于各种聚类算法中. 在ELKI的用户界面中,我可以看到有一些选项可以用更合适的替代默认距离功能(欧几里得).我还看到在那种情况下,您需要提供一个有意义的数据,因为您必须告诉ELKI数据是如何投影的. 我在UI中的选项是使用"geo.LngLatDistanceFunction",因为我使用的是(x,y)坐标,而使用"WGS84SpheroidEarthModel",因为数据位于epsg:4326中. 我正在尝试相应地参数化Java中的算法,但是我不确定如何做到这一点: 如果我这样初始化我的参数:

This is a follow up from a previous question, where we commented that using euclidian distances with lat,long coordinates does not yeld correct results. I read in the documentation that ELKI enables geographic data, namely int its distance function, present in the various clustering algorithms. In the user interface of ELKI, I can see there are options to replace the default distance function (euclidian) by a better suited one. I also see that in that case, you need to provide a datum, which makes sense, since you have to tell ELKI how the data is projected. My options in the UI are to use "geo.LngLatDistanceFunction", since I am using (x,y) coordinates and to use "WGS84SpheroidEarthModel", since the data is in epsg:4326. I am trying to parametrize accordingly my algorithm in Java, but I am not sure how to do it: If I initialize my parameters like this:

ListParameterization params2 = new ListParameterization();
    params2.addParameter(de.lmu.ifi.dbs.elki.algorithm.clustering.DBSCAN.Parameterizer.MINPTS_ID, minPoints);
params2.addParameter(de.lmu.ifi.dbs.elki.algorithm.clustering.DBSCAN.Parameterizer.EPSILON_ID, epsilon);

我可以这样设置距离功能吗?

Could I set the distance function like this?

params2.addParameter(de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm.DISTANCE_FUNCTION_ID, 
            de.lmu.ifi.dbs.elki.distance.distancefunction.geo.LngLatDistanceFunction.class);

那么geo.model呢? (我对此一无所知)

What about the geo.model? (I have no clue about this)

推荐答案

默认的地球模型是SphericalVincentyEarthModel,据说它要快一些(但假设是球形地球,而不是球体);但这不会有太大的区别,除非您需要仪表的精度:根据

The default earth model is SphericalVincentyEarthModel, which is supposedly a bit faster (but assumes a spherical earth, instead of a spheroid); but this should not make much of a difference unless you need precision to the meter: the maximum error should be 0.3% of the distance, according to this answer.

要设置地球模型参数,请使用EarthModel.MODEL_ID作为选项ID. (如LngLatDistanceFunction的参数化程序所引用).尝试查找合适的选项ID时,请务必查看Parameterizers-我们正在将所有选项ID缓慢移入Parameterizers.

To set the earth model parameter, use EarthModel.MODEL_ID as option ID. (As referenced by the Parameterizer of LngLatDistanceFunction). When trying to find the appropriate option ID, always have a look at the Parameterizers - we are slowly moving all the option IDs into the Parameterizers.

这篇关于使用ELKI的距离功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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