Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected results on sets of points #5

Open
ismaelGomez87 opened this issue Dec 26, 2019 · 7 comments
Open

Unexpected results on sets of points #5

ismaelGomez87 opened this issue Dec 26, 2019 · 7 comments
Labels

Comments

@ismaelGomez87
Copy link

Hi @aleksandrbazhin,

I am interested on using your code for some applications on molecular characterization. However, when I compute the ellipsoid for certain point sets I find unexpected results. See below the screenshots of the outcome.

Set1
Set2

I also find the following warning when running over the 1st set:

plot_ellipsoid.py:19: RuntimeWarning: invalid value encountered in double_scalars
  r = (a * b * c) ** (1. / 3.)

Could you please assist? I can share the data if needed.

Best,
Ismael.

@aleksandrbazhin
Copy link
Owner

Hi.
Glad that the code is helpful.
You can try disabling data regularization as it just throws out some of the points which is useful mainly for magnetometer calibrations.
I will try to research the problems you are facing if you provide datasets which cause errors.

@aleksandrbazhin
Copy link
Owner

Also the code computes only the closest ellipsoid to the one with data points on its surface not enclosing all the points. Your data seem to be not suited for that and your results may as well be the closest to that kind of ellipsoids.

@aleksandrbazhin
Copy link
Owner

I think what you need is minimum value enclosing ellipsoid like https://github.com/minillinim/ellipsoid

@aleksandrbazhin
Copy link
Owner

Another option which may be good enough for classification is to construct a convex hull first, then compute an ellipsoid fitting it with this (my) repo.

@ismaelGomez87
Copy link
Author

Hi @aleksandrbazhin,

thanks for your replies. What I need is to adjust an ellipsoid with minimum error to a set of points that are not necessarily placed in a 2D manifold (i.e. there may be no surface embedded in 3D that has all the points). If I understand correctly, your code wouldn't be suited for this task. Would the one you linked work for this?

I could construct the convex hull and select the points that are placed in the surface. Would that be enough to build an ellipsoid with your code?

Thanks,
Ismael.

@aleksandrbazhin
Copy link
Owner

aleksandrbazhin commented Jan 2, 2020

Yes, the code I linked seems to do the job - find the minimal ellipsoid to contain all the points, but I did not look into the code.
The convex hull method also should work. There is a built-in method into scipy package for convex hull construction.
You should try both in my opinion and decide what works best. Or look for something else suited for your data.

@aleksandrbazhin
Copy link
Owner

Tried to describe my view on situation at #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants