Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added session level metric file for session dataframe creation #31

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

nkeesey
Copy link
Collaborator

@nkeesey nkeesey commented Nov 16, 2024

Added session_metrics for session level DataFrame creation with functions from old process_nwbs.py.

  • added basic metadata features from process_nwbs/compute_df_session_meta as a placeholder
  • added majority of performance metrics from process_nwbs/compute_df_session_performance that I found relevant in my analysis
  • Some metrics may be out-dated, need review on which to include from original script/which to ignore
  • Only added one new metric: probability_chosen which is the average difference between the chosen probability and non-chosen probability divided by the difference between the largest probability and smallest probability (for normalization between different stage difficulties). Hopefully this provides a better metric of evaluation independent of task/stage difficulty. See eq: = avg(p_chosen - p_non_chosen) / (p_larger - p_smaller).
  • NOTE: Alex and I's discussed response metric is the same as the 'finished_rate_with_autowater'

Session level metrics:

Basic Metadata:

  • Session start time, subject ID, session date, protocol, etc.

Trial Counts and Rates:

  • Total trials, finished trials, finished rate (both with and without autowater).

  • Reward trials, reward rate, foraging efficiency, and foraging performance.

  • Reaction time (mean and median), early lick rate, and lick consistency.

  • Rates of double dipping (lick switches) during finished, reward, and non-reward trials.

Future work:

  • Cleaning up and merging code from process_nwbs to only update relevant metrics
  • Further probability chosen calculations

DEMO
session_df = session_metrics(nwb)

@alexpiet alexpiet self-requested a review November 16, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants