def test_gev_falls_back_to_pca_for_unity_noise_matrix(self): Phi_XX = hermitian(6, 6) Phi_NN = np.identity(6) W_gev = get_gev_vector(Phi_XX, Phi_NN) W_pca = get_pca_vector(Phi_XX) tc.assert_allclose(cos_similarity(W_gev, W_pca), 1.0, atol=1e-6)
def test_scaled_trace_pca_dimensions(self): output = get_pca_vector(uniform(self.shape_psd), 'trace') assert output.shape == self.shape_vector
def test_scaled_eigenvalue_pca_dimensions(self): output = get_pca_vector(uniform(self.shape_psd), 'eigenvalue') assert output.shape == self.shape_vector
def test_pca_dimensions(self): output = get_pca_vector(uniform(self.shape_psd)) assert output.shape == self.shape_vector