コード例 #1
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()
コード例 #2
0
def test_plot_generic():
    # conditions:
    window = BayesConditions(df=df,
                             y='isi',
                             treatment='stim',
                             condition='neuron',
                             group='mouse')
    window.fit(model=models.model_single)
    window.plot()
コード例 #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_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)
コード例 #5
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()
コード例 #6
0
def test_plot_slope_data_only():
    window = BayesConditions(df=df, y='isi', treatment='stim')
    chart = window.plot()
    chart.display()