예제 #1
0
def test_mds_rosen():
    # so the starting point is kind of cooked...
    n = 5
    z = 0.9 * np.ones(n)
    stopit = (1e-12, np.inf, np.inf, 0, 1)
    x, fmax, nf = rogues.mdsmax(rosen, z, stopit)
    npt.assert_almost_equal(np.ones(n), x)
예제 #2
0
파일: test_mds.py 프로젝트: fabianp/rogues
def test_mds_rosen():
    # so the starting point is kind of cooked...
    n = 5
    z = 0.9 * np.ones(n)
    stopit = (1e-12, np.inf, np.inf, 0, 1)
    x, fmax, nf = rogues.mdsmax(rosen, z, stopit)
    npt.assert_almost_equal(np.ones(n), x)
예제 #3
0
def test_mds_exp():
    n = 5
    z = np.ones(n)
    x, fmax, nf = rogues.mdsmax(exp_func, z)
    va = []
    npt.assert_almost_equal(exp_func(np.zeros(n), va), exp_func(x, va))
예제 #4
0
파일: test_mds.py 프로젝트: fabianp/rogues
def test_mds_exp():
    n = 5
    z = np.ones(n)
    x, fmax, nf = rogues.mdsmax(exp_func, z)
    va = []
    npt.assert_almost_equal(exp_func(np.zeros(n), va), exp_func(x, va))