You should add a unit test where you train a dummy model on random data. With the only current unit test SparseDataset could silently get broken.