【问题标题】:Getting row indices back from the DBIDs neighbours in ELKI CorePredicate DBCAN从 ELKI CorePredicate DBCAN 中的 DBID 邻居获取行索引
【发布时间】:2021-03-22 21:03:06
【问题描述】:

我目前正在尝试(并且正在努力)实现 WeightedCorePredicate 以在 elki 中实现 weighteddbscan。核心谓词的修改代码如下所示:

   public boolean isCorePoint(DBIDRef point, DBIDs neighbors) {
      WeightSum = 0.0; // Make sure to initialize the weights as 0

     
      for (DBIDIter it = neighbors.iter(); it.valid(); it.advance()) {
        /*
          Within here, I need to extract the original indices of the neighbours detected 
          in the original file, and need to link that back to the original data 
          and accumulate the weight columns to the WeightSum to get the weighted 
          core points in dbscan
        */
      }

      return WeightSum >= minpts;
    }
  }
    

这个想法是原始核心谓词的输入之一是加权列数据集,我将使用提取的索引“提取”权重。我的麻烦是获取邻居 DBID 指向的数据的原始索引。我已经尝试过 internalGetIndex() (与原始数据的索引没有任何链接)和偏移索引的方法,但是这些都没有运气,我对如何解决这个问题有点不知所措。

如果有人能提供帮助,我将不胜感激

谢谢

【问题讨论】:

    标签: java dbscan elki


    【解决方案1】:

    换一种方式。

    将每个对象的权重存储在您可以通过DBID 访问的DoubleDataStore 中。不要回到“原始”索引。

    另外,使用局部变量,否则代码在并行运行时会出现竞争条件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-10-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-15
      • 2016-07-04
      相关资源
      最近更新 更多