In [1]:
%matplotlib inline
import os, sys
sys.path.append(os.path.expanduser('~/work/git/cjs/bmlingam/'))
sys.path.append(os.path.expanduser('~/work/git/github/pymc-devs/pymc3/'))

from bmlingam.tests.test_gendata import test_gen_artificial_data

In [2]:
test_gen_artificial_data(plot=True)


xs.shape   = (100, 2)
std(x1)    = 2.9959875139913565
std(x2)    = 4.409926941763207
std(conf1) = 0.7065946070752694
std(conf2) = 0.6783673493103172

{'_b21_dist': 'r2intervals',
 '_conf_dist': [['all']],
 '_e1_dist': ['uniform'],
 '_e1_std': 3.0,
 '_e2_dist': ['laplace'],
 '_e2_std': 3.0,
 '_f1_coef': ['r2intervals'],
 '_f1_scale': 1.0,
 '_f2_coef': ['r2intervals'],
 '_f2_scale': 1.0,
 '_fix_causality': False,
 '_mu1_dist': 5.0,
 '_mu2_dist': 10.0,
 '_n_samples': 100,
 '_seed': 0}

In [3]:
test_gen_artificial_data(plot=True, n_confounders=5)


xs.shape   = (100, 2)
std(x1)    = 4.922053770606598
std(x2)    = 3.506006965105965
std(conf1) = 1.6430975655237954
std(conf2) = 2.3147059149938363

{'_b21_dist': 'r2intervals',
 '_conf_dist': [['all'], ['all'], ['all'], ['all'], ['all']],
 '_e1_dist': ['uniform'],
 '_e1_std': 3.0,
 '_e2_dist': ['laplace'],
 '_e2_std': 3.0,
 '_f1_coef': ['r2intervals',
              'r2intervals',
              'r2intervals',
              'r2intervals',
              'r2intervals'],
 '_f1_scale': 1.0,
 '_f2_coef': ['r2intervals',
              'r2intervals',
              'r2intervals',
              'r2intervals',
              'r2intervals'],
 '_f2_scale': 1.0,
 '_fix_causality': False,
 '_mu1_dist': 5.0,
 '_mu2_dist': 10.0,
 '_n_samples': 100,
 '_seed': 0}

In [ ]: