frequency transformer for scikit-learn