Comments (4)
Hi, thanks for feedback.
Actually, I borrowed this code from https://github.com/minillinim/ellipsoid - you can report there as well.
I tried to replicate bug by generating random sample on axis-aligned ellipsoid, before realizing that np.dot(rotation, [x[i, j], y[i, j], z[i, j]])
(proposed) and np.dot([x[i, j], y[i, j], z[i, j]], rotation)
(current version) is exactly the same and is rotation[0]*x[i, j] + rotation[1]*y[i, j] + rotation[2]*z[i, j]
.
Could you please attach the input that is causing the error? There sure are bugs in that repository, I will try to fix them later.
from ellipsoid_fit_python.
According to the matlab code (https://www.mathworks.com/matlabcentral/fileexchange/24693-ellipsoid-fit), evecs "contains the radii directions as columns of the 3x3 matrix". Therefore, in order for the evecs matrix to rotate a vector [1,0,0] on the unit sphere to the correct location on the ellipsoid, one should use:
np.dot(evecs,[1,0,0]) right?
Maybe I'm missing something.
I'll try to create an example if I find some time.
from ellipsoid_fit_python.
As for my previous answer - I was mistaken, of course rotation is a matrix. But opposed to Matlab code here evecs and rotation contain radii directions as rows not columns. I don't remember why I did it, probably to be able to extract ith eigenvector with evecs[i]. Maybe it was not a good idea as it may cause confusion.
Here I transpose eigenvectors before returning
ellipsoid_fit_python/ellipsoid_fit.py
Line 143 in 331dfb3
from ellipsoid_fit_python.
Oh okay, I see. I missed the transpose when I glanced over the code.
If that's the case, then the plotting should actually be fine and this issue can be closed.
from ellipsoid_fit_python.
Related Issues (14)
- Convert to python3 HOT 2
- Data not being plotted/fitted correctly? HOT 5
- Why you may get unpredictable results.
- Package in PIP HOT 4
- Using data from get_calibration_ellipsoid.py HOT 3
- Calculating transformation matrix HOT 5
- Uncertanty estimation HOT 4
- Fit using test data does not match matlab fit HOT 8
- Wrong return function HOT 2
- Unexpected results on sets of points HOT 7
- Is this package suitable for calibrating an Accelerometer? HOT 1
- Value Error: HOT 4
- Plotting does not work with newer Matplotlib. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ellipsoid_fit_python.