Bias by session or mouse#

The bias triangle with a point per session of one day, or per mouse: as the win-stay / lose-switch plot.

from matplotlib import pyplot as plt

from lecilab_behavior_analysis.metrics.choices import get_bias_evolution_df
from lecilab_behavior_analysis.plots import bias_triangle_plot

fig, (by_session, by_mouse) = plt.subplots(1, 2, figsize=(11, 4))
bias_triangle_plot(get_bias_evolution_df(day, groupby="session"), hue="session", ax=by_session)
by_session.set_title("Sessions of one day")
bias_triangle_plot(get_bias_evolution_df(cohort, groupby=[]), hue="subject", ax=by_mouse)
by_mouse.set_title("Mice")
fig.tight_layout()

trials, day, summary, events and cohort are the inputs of the examples. Back to the gallery