Ejemplo n.º 1
0
def simple_experiment(tmpdir_factory):
    tmpdir = tmpdir_factory.mktemp('experiments').strpath

    p = Parameters(
        cis_count=2,
        reg_channels=4,
        out_channels=2,
        cue_channels=2,
        population_size=100,
        mutation_rate=.001,
    )

    def target_and_or(a, b):
        return [a and b, a or b]

    def target_or_not(a, b):
        return [a or b, a and not b]

    tmp_path = pathlib.Path(tmpdir)

    treats = [
        TestTreatment('and_', p, 3, target_and_or),
        TestTreatment('or_', p, 3, target_or_not),
    ]
    e = Experiment(tmp_path, treats, seed=1)
    e.run(Args(overwrite=True, dry=False))

    return e
Ejemplo n.º 2
0
def test_exp2(tmpdir):
    tmpdir = Path(str(tmpdir))
    treats = [TestCloningTreatment('bob', _params, 10)]
    e = Experiment(tmpdir, treats, seed=1)
    e.run()
Ejemplo n.º 3
0
def test_exp1(tmpdir):
    tmpdir = Path(str(tmpdir))
    # pth = Path('.')
    treats = [MyTreatment('bob', _params, 10)]
    e = Experiment(tmpdir, treats, seed=1, analysis_path="/Users/brett/Desktop")
    e.run()