Coder Social home page Coder Social logo

Comments (4)

aleksandrbazhin avatar aleksandrbazhin commented on May 29, 2024

Hi, I think it needs sufficient refactoring to be published in PIP. In it's current form the repository is more of a example/experiment than a library with a well-designed API.
Should plots be included in the library? Should (rather unconventional) data regularization procedures remain? I did not find a suitable answer, so decided to leave it as it is.
If you have some thoughts, I am open to discussion.

from ellipsoid_fit_python.

f0ma avatar f0ma commented on May 29, 2024

Following text is just my habble opinion:
Today as I know is no packages in PIP for:

  • Ellipsoid fitting by surface points (only for confidence-like ellipsoid like http://kylebarbary.com/nestle/index.html )
  • Ellipsoid parametric plotting (but multiple solution available in google/stackoverflow)
  • Spherical regularization (???)

All thouse useful methods available in ellipsoid_fit.py
File have no dependencies except numpy and optional matplotlib.
About API I think ellipsoid_fit and ellipsoid_plot already have a stable API, but data_regularize require optional aggregation method as argument (default np.mean(np.array(points_in_sector), axis=0), also "Other strategy ..." code, may be some problem specific method by user chouse).
And tests...I think good idea to create some synthetic dataset to make smoke test. I am ready to prepare test data and unittests and share some real data for making a tests.

from ellipsoid_fit_python.

aleksandrbazhin avatar aleksandrbazhin commented on May 29, 2024

About tests - I actually did create synthetic datasets while fixing issues a couple of years ago, just did not commit it.
The biggest problem with this repo is - I don't actually use it and created it in a day or so to calibrate an mpu9150 I had in 2015.

Some doubts I have are

  • The code for regularization was written in a haste, is naive and may be not correct in mathematical sense, or maybe not called regularization. Is taking mean a regularization at all in a strict sence? I like the idea about passing an aggregation method, though.
  • Original matlab code (https://www.mathworks.com/matlabcentral/fileexchange/24693-ellipsoid-fit) has many options for axis aligned ellipsiods which should be also included
  • The plotting method relied heavily on the matpltlib option which has been removed (more here #10) - now there is no way to use equal axis scale without downgrading matplotlib. The code for plotting was not written by me at all, it's from https://github.com/minillinim/ellipsoid (which also has some useful functions for ellipsoids - like finding minimum enclosing ellipsoid).
  • The output format uses row-vectors instead of column-vectors, which was for my convenience, but is in disagreement with (as far as I remember) both the original matlab version and similar functions in scipy. Though I may be wrong here.

Overlall I agree, that there are some useful functions, and I am happy that someone uses the code. Even disregarding all the concerns above, those useful functions you mentioned are mostly related to each other by their connection to magnetometer calibration, so should the package be also called something like 3d_ellipsoid_calibration?

from ellipsoid_fit_python.

aleksandrbazhin avatar aleksandrbazhin commented on May 29, 2024

And another problem with "spherical regularization" is that a center for sphere is a wild guess int the style (min + max) / 2.

Maybe the perfect solution would be join with mentioned minililnim's repository into comprehensive "3d_ellipsoids" package. Or leave everythin as is - it's still googlable.

from ellipsoid_fit_python.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.