split_dataset splits a sparse matrix into training and testing partitions