Python-only version of bob.measure
This MR implements the following changes to this library, in an API backward-compatible way:
- Minimize the number of Bob dependencies to a bare minimum. Use h5py to read data, RNGs and linear algebra from numpy. Remove requirements for bob.core, bob.io.base, bob.blitz, and most of bob.math (except for the PAVX algorithm)
- Remove deprecated dependencies (docopt)
- Use pytest for tests instead of nose
- Re-implement the old C++ as a Python-only library (remove all C++ dependencies such as Boost)
Merge request reports
Activity
@tiago.pereira: have a look, and if you can, test it.
added 1 commit
- 36f4419a - [requirements] Pin bob.math to that pavx is available
Oh wow, that's a nice gift. Thank you very much @andre.anjos,
I'm happy to review it.
This closes #63 (closed)
About the PAVX I can myself port what we have on
bob.math
, but first, let me see if this implementation from scikit-learn is enough: https://scikit-learn.org/stable/modules/generated/sklearn.isotonic.IsotonicRegression.htmlPlease note I have not tested the implementations here, except for its own unit tests, which present 89% coverage, but still. It would be good to have a go at a more realistic scenario.
Edited by André Anjos- Resolved by André Anjos
No feedbacks so far. @tiago.pereira: any thoughts?
Hey @andre.anjos, Yes, I'll review this one, no worries. I just need time.
What I'll do first is to branch the nightlies against this
bob.measure
and see how it goesadded 1 commit
- efc7f52e - [conda] Remove libboost and libblitz from requirements
There are things I'd like to bring in here:
- I have a bunch of useful ML figures of merit on bob/bob.ip.binseg>, including plotting, and significance calculation I'd like to bring to this package and share.
- What is today in
_library
, makes more sense in other sub-modules. For example, all plotting stuff can now be moved to theplot
module.
Before doing these mods, I'd like that we validate this so I can start moving.
The implementation looks perfect. Furthermore, I've tested with the scores I have, and everything matches (Error rates, decision thresholds, plots).
Performance-wise. My test was not suuuuuper scientific. Just for us have an idea.
My scores are in
SCORES=/idiap/temp/tpereira/temp/
bob bio metrics
Script C++ Python #Scores bob bio metrics -e $SCORES/mobio-male/scores-{dev,eval} ~7s ~16s ~212k bob bio metrics $SCORES/arface-lfw/scores-dev ~11s ~40s ~736k bob bio metrics $SCORES/morph/scores-dev ~4m ~38m ~44M bob bio metrics evaluate (it generates all the plots, plus some metrics)
Script C++ Python #Scores bob bio evaluate -e $SCORES/mobio-male/scores-{dev,eval} ~15s ~16s ~212k bob bio evaluate $SCORES/arface-lfw/scores-dev ~20s ~40s ~736k bob bio evaluate $SCORES/morph/scores-dev ~13m - ~44M I'll try to cythonize "_library.py" (never played with cython)
Edited by Tiago de Freitas Pereiraadded 2 commits