-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weighted var #55
Weighted var #55
Conversation
Thanks for working on this! |
No worries, not a big deal.
I have yet to find a use for
Well, that's exactly what we are doing 😁
To notice a difference you need to evaluate it on arrays with a lot of elements, even better if they lead to somewhat badly conditioned operations. The first issue there is the summing algorithm we are using, the naive one. Using pairwise summation would greatly improve numerical stability, but there are pros and cons at the moment, considering that we do not have specialization. Overall it looks good to me 👍 |
I added a benchmark (azip! was slower) but I'm not sure about using mul_add because criterion tells me that it's slower. It's more precise though (from 1e-10 to 1e-11). I'll add it if you want. |
That's interesting! Could you post |
I replace
with
|
Here's the var/std version.
git mv
. Ctrl-fweighted_var
andweighted_std
to know what I actually changed.A::from_usize(0)
fails? Anunwrap
would be safe, no?