Unpopular (?) Opinion: Matrices are a great data structure. But, using linear algebra ops for the vectorization speedup alone is often an obfuscating optimization. A well-commented loop over the clearly-named elements is often better. (Plus, ya know -- numba).
-
-
I don't know, I still think it depends. In the case of Python, electing to use vanilla Python over np is pretty brutal in order of magnitude of difference in running times. I think if you develop in a principled manner and document, vector operations can be just as enlightening.
-
Depends on the size (and if you have a reasonable numba expectation). That annotation amortizes it into oblivion, often.
- 3 more replies
New conversation -
-
-
Like, I *wouldn't* do it in an ML algorithm (unless, as
@kaznatcheev pointed out, the reader has no LA experience). But, I would do it if I'm trying to communicate an unfamiliar, out-of-core statistic that supports some research. -
One of the uses of computational models (over more abstract alternatives) is to communicate with less technical audiences. So this can certainly be an argument for loops in the context of communicative comp. models, or models used for rhetoric or non-technical pedagogy.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.