OPTICS only uses the last neighbor of its call to kneighbors
|
self.core_distances_[:] = nbrs.kneighbors(X, |
It is therefore wasting memory on an array of shape (X.shape[0], min_samples), when it could be getting kneighbors results in multiple chunks (perhaps to ensure working_memory is not exceeded in any chunk) so that only fixed memory plus X.shape[0] distances are stored.