コード例 #1
0
ファイル: test_ecdfgof.py プロジェクト: saaketp/scikit-gof
 def test_args(self):
     # It should be possible to specify a frozen distribution or a name and
     # parameters.
     assert simple_test((.2, .5, .8), uniform(1, 2)).pvalue == 0
     assert simple_test((.2, .5, .8), 'uniform', args=(1, 2)).pvalue == 0
コード例 #2
0
ファイル: test_ecdfgof.py プロジェクト: wrwrwr/scikit-gof
 def test_args(self):
     # It should be possible to specify a frozen distribution or a name and
     # parameters.
     assert simple_test((.2, .5, .8), uniform(1, 2)).pvalue == 0
     assert simple_test((.2, .5, .8), 'uniform', args=(1, 2)).pvalue == 0
コード例 #3
0
ファイル: test_ecdfgof.py プロジェクト: saaketp/scikit-gof
 def test_basic(self):
     # Custom statistic calculation / distribution and object-like result.
     stat = lambda data: 3
     pdist = lambda samples: namedtuple('FD', 'sf')(sf=lambda statistic: .5)
     result = simple_test((1, 2, 3), norm, stat=stat, pdist=pdist)
     assert result.statistic == 3 and result.pvalue == .5
コード例 #4
0
ファイル: test_ecdfgof.py プロジェクト: wrwrwr/scikit-gof
 def test_basic(self):
     # Custom statistic calculation / distribution and object-like result.
     stat = lambda data: 3
     pdist = lambda samples: namedtuple('FD', 'sf')(sf=lambda statistic: .5)
     result = simple_test((1, 2, 3), norm, stat=stat, pdist=pdist)
     assert result.statistic == 3 and result.pvalue == .5