Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def find_image_dprimes(df_clean):
- df_hits = 1-df_clean.query('stim_trial == "stimulation" and side == "left"').groupby(['active_LED','image_number']).mean()['looked_up']
- df_hits = df_hits.replace(to_replace=1, value=.99)
- df_fa = 1-df_clean.query('stim_trial == "no stimulation" and side == "left"').groupby(['active_LED','image_number']).mean()['looked_up']
- df_fa = df_fa.replace(to_replace=0, value=.01)
- dprime = df_hits.apply(norm.ppf)-df_fa.apply(norm.ppf)
- return(dprime)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement