def test_projection_and_belongs(self): gs.random.seed(4) shape = (self.n_samples, self.n, self.n) result = helper.test_projection_and_belongs( self.group, shape, gs.atol * 100) for res in result: self.assertTrue(res)
def test_projection_and_belongs(self): """Test of projection method.""" shape = (2, self.m, self.n) result = helper.test_projection_and_belongs(self.space, shape, atol=gs.atol) for res in result: self.assertTrue(res)
def test_projection_and_belongs_matrix(self): space = self.space_matrix shape = (2, len(space.manifolds), space.manifolds[0].dim + 1) result = helper.test_projection_and_belongs(space, shape, atol=gs.atol * 100) for res in result: self.assertTrue(res)
def test_projection_and_belongs_vector(self): space = self.space_vector shape = (2, space.dim + 2) result = helper.test_projection_and_belongs(space, shape, atol=gs.atol * 100) for res in result: self.assertTrue(res)
def test_projection_and_belongs(self): """Test projection and belongs. Check that result of projection belongs to the space of Dirichlet distributions.""" shape = (self.n_samples, self.dim) result = helper.test_projection_and_belongs(self.dirichlet, shape) for res in result: self.assertTrue(res)
def test_projection_and_belongs(self): shape = (self.n_samples, self.dimension + 1) result = helper.test_projection_and_belongs( self.space, shape, atol=gs.atol * 100 ) for res in result: self.assertTrue(res) point = gs.array([0.0, 1.0, 0.0, 0.0]) projected = self.space.projection(point) result = self.space.belongs(projected) self.assertTrue(result)
def test_projection_and_belongs(self): result = helper.test_projection_and_belongs( self.product, shape=(3, 2, 3, 3), atol=1e-4 ) for res in result: self.assertTrue(res)
def test_projection_and_belongs(self): shape = (self.n_samples, self.n + 1, self.n + 1) result = helper.test_projection_and_belongs(self.group, shape) for res in result: self.assertTrue(res)
def test_projection_and_belongs(self): shape = (self.n_samples, self.n, self.p) result = helper.test_projection_and_belongs(self.space, shape) for res in result: self.assertTrue(res)
def test_projection_and_belongs(self): shape = (2, self.n, self.n) space = self.space result = helper.test_projection_and_belongs(space, shape) for res in result: self.assertTrue(res)