def test_TangentSpace_inversetransform_without_fit():
    """Test inverse transform of Tangent Space without fit."""
    covset = generate_cov(10, 3)
    ts = TangentSpace(metric='identity')
    tsv = ts.fit_transform(covset)
    ts = TangentSpace(metric='riemann')
    cov = ts.inverse_transform(tsv)
    assert_array_almost_equal(covset, cov)
 def transform(self, X):
     """
     Detect and remove dropped.
     """
     features = []
     for x in X:
         ts = TangentSpace(metric=self.metric)
         tmp = ts.fit_transform(x.transpose(2, 0, 1))
         features.append(tmp.ravel())
     features = np.array(features)
     return features
Ejemplo n.º 3
0
 def transform(self, X):
     """
     Detect and remove dropped.
     """
     features = []
     for x in X:
         ts = TangentSpace(metric=self.metric)
         tmp = ts.fit_transform(x.transpose(2, 0, 1))
         features.append(tmp.ravel())
     features = np.array(features)
     return features