def test_hopfield_network_predict(self):
        node_number = 4
        threshold   = 0
        hn = HopfieldNetwork(node_number, threshold)

        train_data = [[1, 1, 1, -1], [-1, -1, 1, 1]]
        hn.train(train_data)


        # アソシアトロン
        assert hn.get_updated_state(hn.weight_mat , np.array([[1, 1, 1, -1]])).tolist()  == [[1, 1, 1, -1]]
        assert hn.get_updated_state(hn.weight_mat , np.array([[-1, -1, 1, 1]])).tolist() == [[-1, -1, 1, 1]]
        assert hn.get_updated_state(hn.weight_mat , np.array([[1, 1, -1, -1]])).tolist() == [[1, 1, 1, -1]]

        # hopfield
        assert hn.predict([1, 1, 1, -1])  == [[1, 1, 1, -1]]
        assert hn.predict([-1, -1, 1, 1]) == [[-1, -1, 1, 1]]
        assert hn.predict([1, 1, -1, -1]) == [[1, 1, 1, -1]]