plot_neural_reconstruction_traces

behavenet.plotting.decoder_utils.plot_neural_reconstruction_traces(traces_ae, traces_neural, save_file=None, xtick_locs=None, frame_rate=None, format='png', scale=0.5, max_traces=8, add_r2=True, add_legend=True, colored_predictions=True, title=None)[source]

Plot ae latents and their neural reconstructions.

Parameters:
  • traces_ae (np.ndarray) – shape (n_frames, n_latents)

  • traces_neural (np.ndarray) – shape (n_frames, n_latents)

  • save_file (str, optional) – full save file (path and filename)

  • xtick_locs (array-like, optional) – tick locations in units of bins

  • frame_rate (float, optional) – frame rate of behavorial video; to properly relabel xticks

  • format (str, optional) – any accepted matplotlib save format, e.g. ‘png’ | ‘pdf’ | ‘jpeg’

  • scale (int, optional) – scale magnitude of traces

  • max_traces (int, optional) – maximum number of traces to plot, for easier visualization

  • add_r2 (bool, optional) – print R2 value on plot

  • add_legend (bool, optional) – print legend on plot

  • colored_predictions (bool, optional) – color predictions using default seaborn colormap; else predictions are black

  • title (str, optional) – add title to plot

Returns:

matplotlib figure handle

Return type:

matplotlib.figure.Figure