示例#1
0
    def test_compose(self):

        model = WeightedAdditive(2,3)
        np.testing.assert_array_equal(model._compose(self.m11, self.m21).mat,
                                                      self.ph1.mat)

        model = WeightedAdditive()
        np.testing.assert_array_equal(model._compose(self.m11, self.m21).mat,
                                                      np.mat([[7/2.],[11/2.]]))

        model = WeightedAdditive(0.5)
        np.testing.assert_array_equal(model._compose(self.m11, self.m21).mat,
                                                      np.mat([[7/2.],[11/2.]]))