Beispiel #1
0
def test_sparse_formats(setup):
    tsvd = TruncatedSVD(n_components=11)
    Xtrans = tsvd.fit_transform(Xdense)
    assert Xtrans.shape == (n_samples, 11)
    Xtrans = tsvd.transform(Xdense)
    assert Xtrans.shape == (n_samples, 11)
Beispiel #2
0
 def test_sparse_formats(self):
     tsvd = TruncatedSVD(n_components=11)
     Xtrans = tsvd.fit_transform(self.Xdense)
     self.assertEqual(Xtrans.shape, (self.n_samples, 11))
     Xtrans = tsvd.transform(self.Xdense)
     self.assertEqual(Xtrans.shape, (self.n_samples, 11))