【发布时间】: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() (与原始数据的索引没有任何链接)和偏移索引的方法,但是这些都没有运气,我对如何解决这个问题有点不知所措。
如果有人能提供帮助,我将不胜感激
谢谢
【问题讨论】: