예제 #1
0
def test_fit_conditions():
    # TODO combined condition here somehow
    window = BayesConditions(df=df,
                             y='isi',
                             treatment='stim',
                             condition='neuron',
                             group='mouse')
    window.fit()
예제 #2
0
def test_estimate_posteriors_data_overlay():
    window = BayesConditions(df=df,
                             y='isi',
                             treatment='stim',
                             condition='neuron',
                             group='mouse')
    window.fit(model=models.model_single, )
    chart = window.plot(x='stim:O',
                        independent_axes=False,
                        column='neuron',
                        row='mouse')
    chart.display()
예제 #3
0
def test_facet():
    # conditions:
    window = BayesConditions(df=df,
                             y='isi',
                             treatment='stim',
                             condition='neuron',
                             group='mouse')
    window.fit(model=models.model_single)
    window.plot(row='neuron', width=40)
    window.plot(x='neuron').facet(column='mouse')
예제 #4
0
def test_estimate_posteriors():
    window = BayesConditions(
        df=df,
        y='isi',
        treatment='stim',
        condition=[
            'neuron_x_mouse',
            'i_trial',
        ],
        group='mouse',
    )
    window.fit(model=models.model_single)

    chart = window.plot(
        x='stim:O',
        column='neuron',
        row='mouse',
    )
    chart.display()
    chart = window.plot(
        x='stim:O',
        column='neuron',
        row='mouse',
    )
    chart.display()
예제 #5
0
def test_plot_model_quality():
    window = BayesConditions(df=df,
                             y='isi',
                             treatment='stim',
                             condition='neuron',
                             group='mouse')
    window.fit(model=models.model_single)
    window.plot_model_quality()
예제 #6
0
def test_conditions2():
    df.neuron = df.neuron.astype(int)
    window = BayesConditions(df=df,
                             y='isi',
                             treatment='stim',
                             condition='neuron',
                             group='mouse',
                             add_data=True)

    window.fit(model=models.model_single, num_chains=1)
    assert window.window.y in window.data_and_posterior
    window.plot(x='stim:O', independent_axes=False, add_data=True)
예제 #7
0
def test_plot_slope_data_only():
    window = BayesConditions(df=df, y='isi', treatment='stim')
    chart = window.plot()
    chart.display()
예제 #8
0
def test_plot_model_quality():
    # conditions:
    window = BayesConditions(df=dfl, y='isi', treatment='stim')
    window.fit(model=models.model_single)
    window.plot_model_quality()