You should test whether it is sparse or not. I see no reason to use SparseDataset with a dense matrix.