def test_create_blended_map(): P1 = np.random.uniform(0.0, 1.0, (4,4)) P2 = np.random.uniform(0.0, 1.0, (4,4)) labels1 = np.array([0, 1, 2, 3]) labels2 = np.array([2, 3, 4, 5]) map1 = mapalgo.create_map("map1", P1, labels=labels1) map2 = mapalgo.create_map("map2", P2, labels=labels2) blend = mapalgo.create_blended_map("blend", [map1, map2], [0.5, 0.5])
def test_create_map_with_prior(): P1 = np.random.uniform(0.0, 1.0, (4,4)) P2 = np.random.uniform(0.0, 1.0, (4,4)) m1 = mapalgo.create_map("map1", P1) m2 = mapalgo.create_map("map2", P2, prior=m1) print(m1) print(m2)
def test_create_map_incomplete_prior(): P1 = np.random.uniform(0.0, 1.0, (4,4)) P1[:,0] = 0.0 P1[0,:] = 0.0 P2 = np.random.uniform(0.0, 1.0, (4,4)) m1 = mapalgo.create_map("map1", P1) m2 = mapalgo.create_map("map2", P2, prior=m1) print(m1) print(m2)
def test_create_map_unif(): P = np.ones((3,3)) - np.eye(3) m = mapalgo.create_map("test", P) print(m.y)
def test_create_map_zeros(): P = np.ones((4,4)) - np.eye(4) P[:,0] = 0.0 P[0,:] = 0.0 m = mapalgo.create_map("test", P) print(m.y)