Closed arvoelke closed 6 years ago
Merging #153 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #153 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 29 29
Lines 1374 1398 +24
Branches 157 162 +5
=====================================
+ Hits 1374 1398 +24
Impacted Files | Coverage Δ | |
---|---|---|
nengolib/stats/ntmdists.py | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a523f79...293492c. Read the comment docs.
@astoeckel Since you were using the Halton sequence, this might be of interest to you. This is a new quasi-random sequence, that's been implemented as a Nengo distribution. You can use it to generate scattered points on the cube, sphere, or ball.
Links to staging documentation (with inline code examples):
@arvoelke Could @sdementen's suggestions be incorporated? (Avoiding Python for loops, which are slow, as much as possible.)
Thanks for the feedback/request. Done in https://github.com/arvoelke/nengolib/pull/191 which has been merged into master. It is unlikely to be released to pypi due to compatibility drift that should be sorted out. It should be possible to install/depend on master directly if this speed-up is needed.
@arvoelke Thanks! I see a few other places in the code could benefit from vectorization as well, if you're interested. Let me know if you'd like me to open an issue or pull request.
I'd be interested in PRs if they are motivated by things that you're running and then you found that your changes helped run them faster/etc (as opposed to just optimizing code for the sake of it).
If you are hungry for speed-ups across the board I would suggest looking into Pyston. The lite version can be installed via pip install pyston_lite_autoload
and provides a boost in speed to the entire Python process. I've had good experiences with both lite and full versions.
Resolves #152. Code is modified from http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/
This is a new method for sampling points from the sphere and ball (encoders and evaluation points). It is still possible to use the old method by passing
base=Sobol()
to the constructor of all of the distributions, instead of the new default ofbase=Rd()
. The biggest benefit is the new method works for arbitrary dimension, whereas the old method regressed to Nengo's independent distribution ford > 40
.Some plots from the new method (to be in the documentation upon release):
Versus the old method (Sobol):