def test_basic(self):
    '\n        Nothing special. Just test basic things.\n        '
    seed = 12
    n = 100
    alpha = 0.01
    for d in [1, 4]:
        mean = np.zeros(d)
        variance = 1
        isonorm = density.IsotropicNormal(mean, variance)
        draw_mean = (mean + 0)
        draw_variance = (variance + 1)
        X = ((util.randn(n, d, seed=seed) * np.sqrt(draw_variance)) + draw_mean)
        dat = data.Data(X)
        for J in [1, 3]:
            sig2 = (util.meddistance(X, subsample=1000) ** 2)
            k = kernel.KGauss(sig2)
            V = util.fit_gaussian_draw(X, J, seed=(seed + 1))
            null_sim = gof.FSSDH0SimCovObs(n_simulate=200, seed=3)
            fssd = gof.FSSD(isonorm, k, V, null_sim=null_sim, alpha=alpha)
            tresult = fssd.perform_test(dat, return_simulated_stats=True)
            self.assertGreaterEqual(tresult['pvalue'], 0)
            self.assertLessEqual(tresult['pvalue'], 1)
Nothing special. Just test basic things.
def test_basic(self):
    '\n        \n        '
    seed = 12
    n = 100
    alpha = 0.01
    for d in [1, 4]:
        mean = np.zeros(d)
        variance = 1
        isonorm = density.IsotropicNormal(mean, variance)
        draw_mean = (mean + 0)
        draw_variance = (variance + 1)
        X = ((util.randn(n, d, seed=seed) * np.sqrt(draw_variance)) + draw_mean)
        dat = data.Data(X)
        for J in [1, 3]:
            sig2 = (util.meddistance(X, subsample=1000) ** 2)
            k = kernel.KGauss(sig2)
            V = util.fit_gaussian_draw(X, J, seed=(seed + 1))
            null_sim = gof.FSSDH0SimCovObs(n_simulate=200, seed=3)
            fssd = gof.FSSD(isonorm, k, V, null_sim=null_sim, alpha=alpha)
            tresult = fssd.perform_test(dat, return_simulated_stats=True)
            self.assertGreaterEqual(tresult['pvalue'], 0)
            self.assertLessEqual(tresult['pvalue'], 1)