ELKI DBSCAN R *树索引 [英] ELKI DBSCAN R* tree index

查看:137
本文介绍了ELKI DBSCAN R *树索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MiniGUi中,我可以看到db.index.如何通过Java代码将其设置为tree.spatial.rstarvariants.rstar.RStartTreeFactory?

我已经实现:

params.addParameter(AbstractDatabase.Parameterizer.INDEX_ID,tree.spatial.rstarvariants.rstar.RStarTreeFactory);

对于addParameter()函数tree.spatial...RStarTreeFactory类的第二个参数找不到

// Setup parameters:
            ListParameterization params = new ListParameterization();
            params.addParameter(
                    FileBasedDatabaseConnection.Parameterizer.INPUT_ID,
                    fileLocation);
            params.addParameter(AbstractDatabase.Parameterizer.INDEX_ID,
                RStarTreeFactory.class);

我正在获取NullPointerException.我正确使用了RStarTreeFactory.class吗?

解决方案

ELKI命令行(和MiniGui;这是命令行构建器)允许指定速记类名,而忽略了已实现接口的包前缀./p>

完整的命令行文档会产生:

-db.index <object_1|class_1,...,object_n|class_n>
    Database indexes to add.
    Implementing de.lmu.ifi.dbs.elki.index.IndexFactory
    Known classes (default package de.lmu.ifi.dbs.elki.index.):
    -> tree.spatial.rstarvariants.rstar.RStarTreeFactory
    -> ...

即对于此参数,可以省略类前缀de.lmu.ifi.dbs.elki.index..

完整的类名称为:

de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.rstar.RStarTreeFactory

或者您只需键入RStarTreeFactory,然后让eclipse自动修复导入:

params.addParameter(AbstractDatabase.Parameterizer.INDEX_ID,
    RStarTreeFactory.class);
// Bulk loading static data yields much better trees and is much faster, too.
params.addParameter(RStarTreeFactory.Parameterizer.BULK_SPLIT_ID, 
    SortTileRecursiveBulkSplit.class);
// Page size should fit your dimensionality.
// For 2-dimensional data, use page sizes less than 1000.
// Rule of thumb: 15...20 * (dim * 8 + 4) is usually reasonable
// (for in-memory bulk-loaded trees)
params.addParameter(AbstractPageFileFactory.Parameterizer.PAGE_SIZE_ID, 300);

另请参见: 解决方案

The ELKI command line (and MiniGui; which is a command line builder) allow to specify shorthand class names, leaving out the package prefix of the implemented interface.

The full command line documentation yields:

-db.index <object_1|class_1,...,object_n|class_n>
    Database indexes to add.
    Implementing de.lmu.ifi.dbs.elki.index.IndexFactory
    Known classes (default package de.lmu.ifi.dbs.elki.index.):
    -> tree.spatial.rstarvariants.rstar.RStarTreeFactory
    -> ...

I.e. for this parameter, the class prefix de.lmu.ifi.dbs.elki.index. may be omitted.

The full class name thus is:

de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.rstar.RStarTreeFactory

or you just type RStarTreeFactory, and let eclipse auto-repair the import:

params.addParameter(AbstractDatabase.Parameterizer.INDEX_ID,
    RStarTreeFactory.class);
// Bulk loading static data yields much better trees and is much faster, too.
params.addParameter(RStarTreeFactory.Parameterizer.BULK_SPLIT_ID, 
    SortTileRecursiveBulkSplit.class);
// Page size should fit your dimensionality.
// For 2-dimensional data, use page sizes less than 1000.
// Rule of thumb: 15...20 * (dim * 8 + 4) is usually reasonable
// (for in-memory bulk-loaded trees)
params.addParameter(AbstractPageFileFactory.Parameterizer.PAGE_SIZE_ID, 300);

See also: Geo Indexing example in the tutorial folder.

这篇关于ELKI DBSCAN R *树索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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