method fit() in DBScan:
RadiusNeighbors rnModel = (new RadiusNeighbors(this.data, (new RadiusNeighborsParameters(this.eps)).setSeed(this.getSeed()).setMetric(this.getSeparabilityMetric()).setVerbose(false))).fit();
this.info("fit RadiusNeighbors model in " + rnTimer.toString());
code for choosing BALL_TREE or KD_TREE to use:
private static BaseNeighborsModel.NeighborsAlgorithm delegateAlgorithm(RealMatrix arm) {
int mn = arm.getColumnDimension() * arm.getRowDimension();
return mn > 15000 ? BALL_TREE : KD_TREE;
}
So, we can not use haversine distance when mn<=15000.(KD_TREE do not suport haversine distance)