[FIX] Reimplement concave hull
Issue
Current concave hull search implementation (required for annotator) is occasionally missing points (some points stay out of the cluster) and is dependent on the DBSCAN's parameter (which is not sufficient for GMM clustering)
Description of changes
Reimplement concave hull with modified k-nearest neighbour implementation. The implementation is made based on the KNN method described in https://repositorium.sdum.uminho.pt/handle/1822/6429 and is modified so that it does not need an initial k and speedup is made in the incrementation of k when it is too small (replaced by bisection)
Includes
- [X] Code changes
- [X] Tests
- [ ] Documentation
We discussed reimplementing this functionality with the concept of alpha-shapes using the Shapely and alphashape libraries. If alphashape takes too long to find a good alpha value, we can reimplement this search. Otherwise, we can reimplement the entire procedure using Shapely (example - https://gist.github.com/dwyerk/10561690)
@thocevar I finally found some time to finish this one. Now it is ready for review.