Comments (12)
@Moham21 can you give an example of a matrix whre
scipy.pinv
doesn't work butscipy.pinv2
does work?
I checked the test errors that I had so far and I didn't come across an inverse problem, but rather an eigenvalue conversion. And we have decided to try numpy
and except scipy
and that helped for the most part.
from procrustes.
Hi! Thank you for your interest in our package. @the-nihilist-ninja
If you install the latest version of our package from the source, pinv2
has been replaced by pinv
.
I am going to close this issue for now. But please feel free to reopen this issue or create a new one if needed.
from procrustes.
Thanks for the tips. Would that be possible to update it on pypi?
from procrustes.
Updating on pypi should be possible with cardboardlint.
from procrustes.
We are again having issues here. I think we need to remove the pinv2
functionality.
The issue with Moore-Penrose pseudoinverses not working still exists, however, although it rarely occurs. (It is a shame that scipy
and numpy
do not give more transparent method control in linear algebra routines.) A hack that works is to add a little bit of random noise when the matrix is ill conditioned. Something like the following should work in almost all cases.
try:
Minv = np.linalg.pinv(M)
except np.linalg.LinAlgError:
M = 2e-14*np.random.random_sample((t1.shape[0],t1.shape[1])) - 1e-14
M= np.linalg.pinv(M)
from procrustes.
Do you mean getting an error when using pinv2
? If so, I would assume that people installed our package from PyPI instead of the latest codes in the master branch. The pinv2
function has been replaced with pinv
function already. If not, the way you proposed makes sense and I can make a change soon. @PaulWAyers
from procrustes.
Yep, we can resolve this by requiring old versions of scipy, which is fine. But probably better to evolve to the newest versions of scipy anyway.
from procrustes.
Can you (or who encountered the problem) provide an example showing the problem of using pinv
function? I will add this as a test in the fix. Thanks.
from procrustes.
The issue showed up in gopt
, but I remembered that the same issue appears here. @Moham21 should have an example of a matrix that's problematic.
from procrustes.
@Moham21 can you give an example of a matrix whre scipy.pinv
doesn't work but scipy.pinv2
does work?
from procrustes.
Do you still have a matrix example to show how the pinv2
failed? This would be useful for me to build a test. Thank you. @Moham21
from procrustes.
I talked to @Moham21 and the examples she had were from the eigenvalue problem. She was constructing a generalized inverse, but doing it "by hand" using the eigenvalues.
As I recall, the examples that failed where ones where the matrix had several rows and/or columns of zeros. I think a nilpotent matrix might be a good example, but I did not confirm this.
from procrustes.
Related Issues (20)
- Can't install from pip HOT 3
- Support of missing values for generalized Procrustes analysis
- L-1 procrustes HOT 10
- Installing with pip according to instructions does not work HOT 5
- Molecular Structure Distance HOT 1
- Non square data in softassign function - cannot reshape array HOT 4
- An alternative way of solving rotational Procrutes problem HOT 4
- Web Site HOT 2
- Would be nice to have the used scaling and translation returned in the answer HOT 9
- Add support of 1D, 2D and 3D molecular structures HOT 3
- translation, scling, weighting for positive semi-definite Procrustes problem HOT 2
- Deprecated `pinv2` function in `scipy.linalg` HOT 2
- Update the summary table when #98 is done
- Failing testing, `test_psdp_woodgate_non_full_rank` HOT 11
- More algorithms on `PSDP` HOT 18
- Another round of code review for GSoC HOT 1
- Support Weight Matrices
- One-Sided Procrustes for Toeplitz matrices HOT 5
- positive semi-definite Procrustes problem HOT 6
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 procrustes.