def test_bayesian_info_criterion_lsq():
 n_samples = 25
 n_params = (1, 2, 1)
 ssr = (48959, 32512, 37980)
 answer = (192.706, 185.706, 186.36)
 assert_allclose(answer[0], bayesian_info_criterion_lsq(ssr[0], n_params[0], n_samples), atol=0.01)
 assert_allclose(answer[1], bayesian_info_criterion_lsq(ssr[1], n_params[1], n_samples), atol=0.01)
 assert_allclose(answer[2], bayesian_info_criterion_lsq(ssr[2], n_params[2], n_samples), atol=0.01)

def test_bayesian_info_criterion_lsq ( ) : n_samples = 25 n_params = ( 1 , 2 , 1 ) ssr = ( 48959 , 32512 , 37980 ) answer = ( 192.706 , 185.706 , 186.36 ) assert_allclose ( answer [ 0 ] , bayesian_info_criterion_lsq ( ssr [ 0 ] , n_params [ 0 ] , n_samples ) , atol = 0.01 ) assert_allclose ( answer [ 1 ] , bayesian_info_criterion_lsq ( ssr [ 1 ] , n_params [ 1 ] , n_samples ) , atol = 0.01 ) assert_allclose ( answer [ 2 ] , bayesian_info_criterion_lsq ( ssr [ 2 ] , n_params [ 2 ] , n_samples ) , atol = 0.01 )
this test is from: URL akaikelsg .