find most dense neighborhood of points in high dimensional space I'm working on a project where I have many high-dimensional points and I want to find the most dense neighborhood of them. Ideally, out of my ~500 points that are each a 4x300 matrix (300 ms time series of four variables) I want to find the ~30 points that are the most similar. I've looked into k nearest neighbor methods but those are all finding the smallest neighborhoods of a certain point, I want to be able to specify the size N of the neighborhood (how many data points) and get the subset N points that are the closest together.

I think(?) that this is a clustering problem so I've looked at soft subspace clustering which clusters using the more relevant dimensions and also I've looked into biclustering which was developed specifically for time series data. 

Any help would be greatly appreciated! I have a problem that I'm sure someone else has thought of but I don't think I know exactly how to word it and everything I've looked at so far has been close but not exactly what I need. So any papers/code/tutorials/etc that give me any information on how I might solve this would be fantastic :D

Update: I've looked into using Frechet distance to use as a distance between time series. Would that be an appropriate metric to use for this type of data?
Look into anomaly detection algorithms. Scikit-learn has a variety of built-in ones in its outlier detection module. Finding 30 most similar points among 500 is the same as finding 470 outliers. Most of these algorithms have a parameter contamination which specifies what fraction of your dataset you generally expect to classify as outliers, so manipulating the value of this parameter can possibly give you what you want to achieve.