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).
-
-
-
Replying to @terrible_coder
Readability. You can look at a sequence of matrix operations and understand what it does, computationally, but outside common and familiar algorithms, the why and what part gets lost easily. What's this matrix represent? Where does the shape come from?
1 reply 0 retweets 1 like -
Replying to @generativist
Maybe I'm missing something, but I think that semantics shouldn't leak that far down into code. Keeping the implementation slower for the sake of readability removes so much of the benefit of computing.
1 reply 0 retweets 0 likes -
Replying to @terrible_coder @generativist
That's why we come up with abstractions: to shield nasty details for all but the brave.
1 reply 0 retweets 1 like -
Replying to @terrible_coder
I should have contextualized this better (see:
@kaznatcheev mentions, too.) If you're avoiding matrix ops in production code, you're probably doing the wrong thing. But, if you're using them in pedagogical code, you're probably not.2 replies 0 retweets 2 likes -
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.1 reply 0 retweets 0 likes -
Replying to @generativist @terrible_coder
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.
1 reply 0 retweets 5 likes -
Replying to @kaznatcheev @generativist
I think I'd argue the opposite. Abstract models are supposed to hide the details, making them more digestible. Focus is shifted from how it's happening to what is happening.
2 replies 0 retweets 1 like -
Replying to @terrible_coder @generativist
I don't agree. I find students struggle more w/ abstract than concrete objects. Handling abstract models requires certain degree of technical background. I'd agree for idealized models that just ignore details (instead of abstracting over them). For diff:https://egtheory.wordpress.com/2018/06/15/bookkeeping-abstraction-vs-idealization/ …
2 replies 0 retweets 1 like
Yep. Def worth thinking about more in a blog post. I think I gotta find the right partition of contexts over audience x domain x application, first.
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.