clone from agramfort of scikit-learn: machine learning in Python