Make metrics easily usable with scikit learn.
Fix missing import of tools.