TL;DR: THE QUESTION IS ABOUT MULTIPLICATION ACCURACY
I have to multiply matrices A (100x8000), B (8000x27) and C (27x1).
Since matrices B and C are constant and A is variable, I prefer to calculate it as: ABC = np.dot(A, np.dot(B, C)). However I wonder, that it may be numerically worse (in terms of accuracy) than np.dot(np.dot(a, B), C).
What may be important: matrices A and B contain 8000 samples of (respectively) 100 and 27 correlated features.
Is there some numerically optimal (in terms of accuracy) order of the multiplication? If yes - how may I determine it?
from Is there a numerically optimal order of matrix multiplication?
No comments:
Post a Comment