Unger, Jörg
2016-06-16 09:12:25 UTC
I've tried the example that is available here
http://scikit-learn.org/stable/auto_examples/manifold/plot_manifold_sphere.html
These are essentially points on a 3D sphere, so the dimension of the embedded manifold is two.
I've changed the example a little bit to extract the error as well. So instead of
trans_data = manifold\
.LocallyLinearEmbedding(n_neighbors, 2,
method=method).fit_transform(sphere_data).T
I've done something like
solver = manifold.LocallyLinearEmbedding(n_neighbors, dim_y, method=method)
trans_data = solver.fit_transform(sphere_data).T
error = solver.reconstruction_error_
I would have expected the error to be significant for dim_y=1, since I can't reproduce with just a single coordinate the results. For dim_y=2, I expected a significant decrease, and for dim_y=3, I expected to exactly recover the original result.
What I get is (for standard LLE)
dim_y = 1 : error = 1.62031573333e-07
dim_y = 2 : error = 1.79465538543e-06
dim_y = 3 : error = 7.00280676182e-06
Could anyone explain, why I do not get the expected results?
Furthermore, is there an option to retransform the coordinates from the local dimension to the global dimension? I'm interested in transforming the original global samples to local coordinates (this is done via the transform method), but then I would like to transform samples from coordinates in the embedded space back into the global space.
Best regards,
Jörg F. Unger
http://scikit-learn.org/stable/auto_examples/manifold/plot_manifold_sphere.html
These are essentially points on a 3D sphere, so the dimension of the embedded manifold is two.
I've changed the example a little bit to extract the error as well. So instead of
trans_data = manifold\
.LocallyLinearEmbedding(n_neighbors, 2,
method=method).fit_transform(sphere_data).T
I've done something like
solver = manifold.LocallyLinearEmbedding(n_neighbors, dim_y, method=method)
trans_data = solver.fit_transform(sphere_data).T
error = solver.reconstruction_error_
I would have expected the error to be significant for dim_y=1, since I can't reproduce with just a single coordinate the results. For dim_y=2, I expected a significant decrease, and for dim_y=3, I expected to exactly recover the original result.
What I get is (for standard LLE)
dim_y = 1 : error = 1.62031573333e-07
dim_y = 2 : error = 1.79465538543e-06
dim_y = 3 : error = 7.00280676182e-06
Could anyone explain, why I do not get the expected results?
Furthermore, is there an option to retransform the coordinates from the local dimension to the global dimension? I'm interested in transforming the original global samples to local coordinates (this is done via the transform method), but then I would like to transform samples from coordinates in the embedded space back into the global space.
Best regards,
Jörg F. Unger