Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

8
Why are libraries much faster than "hand written code"?
Post Body

For example, I can estimate a linear regression for a dataset of 400k observations, and get the predicted values or the regressand in <3 seconds (using the statsmodels library)

However if I manually save all the coefficients from the regression into an array, and multiply each element of that array with the respective datapoint in the data matrix, and sum the resulting numbers for each row of the matrix (hence getting an identical array of predicted values as above), it's much longer. Using a nested for loop function it takes ~5 minutes, even using numba's @jit function.

What am I missing?

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
150,300
Link Karma
18,628
Comment Karma
129,685
Profile updated: 3 days ago
Posts updated: 9 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
9 years ago