derivator = parameters.tryInstantiate(cls);
CorrelationAnalysisSolution<DoubleVector> model = derivator.run(derivatorDB);
Matrix weightMatrix = model.getSimilarityMatrix();
DoubleVector centroid = new DoubleVector(model.getCentroid());
DistanceQuery<DoubleVector, DoubleDistance> df = QueryUtil.getDistanceQuery(derivatorDB, new WeightedDistanceFunction(weightMatrix));
DoubleDistance eps = df.getDistanceFactory().parseString("0.25");
ids.addDBIDs(interval.getIDs());
// Search for nearby vectors in original database
for(DBID id : relation.iterDBIDs()) {
DoubleVector v = new DoubleVector(relation.get(id).getColumnVector().getArrayRef());
DoubleDistance d = df.distance(v, centroid);
if(d.compareTo(eps) < 0) {
ids.add(id);
}
}