flatten data to fit with scikit until find better library or reimplement custom emission