ManifoldLearning.jl icon indicating copy to clipboard operation
ManifoldLearning.jl copied to clipboard

Isomap nnType: Method error

Open FedeClaudi opened this issue 1 year ago • 3 comments

Hey, thanks for this awesome package.

I'm trying to fit Isomap using nntype=KDTree from NearestNeighbors but I get a method error image

The error line being NN = fit(nntype, X) here.

Any advice on how to get around this? Using brute force tree works but I'd like to find an easier solution. Also, is there a way to pass an already fitted tree? I'd like to re-use the same tree across different analysis steps.

Thank you

FedeClaudi avatar Sep 14 '22 16:09 FedeClaudi

You cannot use directly KDTree. Here is the wrapper: https://github.com/wildart/ManifoldLearning.jl/blob/4568237cbf01841b65f1784e5f9ac357b8a27013/misc/nearestneighbors.jl#L9

wildart avatar Sep 14 '22 18:09 wildart

I see, thank you. Perhaps its worth adding a warning in the docs, I took them to mean that you can just use any tree type from nearest neighbours!

FedeClaudi avatar Sep 14 '22 22:09 FedeClaudi

Julia lets you carried away. I need to put a type check for AbstractNearestNeighbors there.

wildart avatar Sep 15 '22 03:09 wildart