neuropsychology / NeuroKit.py

A Python Toolbox for Statistics and Neurophysiological Signal Processing (EEG, EDA, ECG, EMG...).
http://neurokit.rtfd.io
MIT License
365 stars 102 forks source link

compute_dprime function has n_hits, n_miss, n_cr, n_fa hard coded #76

Closed jonathanicholas closed 6 years ago

jonathanicholas commented 6 years ago

Hi--Thanks for developing this repo. I wanted to compare my own dprime/aprime calculations with ones from other repos and found the following:

https://github.com/neuropsychology/NeuroKit.py/blob/867655f84bf210626649bca72258af6a2b5a2791/neurokit/statistics/routines.py#L81

Should be an easy fix. Thanks!

DominiqueMakowski commented 6 years ago

Indeed a bug that must have passed through the tests! thanks for noticing!! Should be fixed on master now

jonathanicholas commented 6 years ago

No worries! It also looks like there's a bug in the dprime calculation where hit_rate_adjusted is subtracted from hit_rate_adjusted rather than fa_rate_adjusted

https://github.com/neuropsychology/NeuroKit.py/blob/867655f84bf210626649bca72258af6a2b5a2791/neurokit/statistics/routines.py#L97

DominiqueMakowski commented 6 years ago

Damn! lucky you're here :)

jonathanicholas commented 6 years ago

hah, no problem! Gonna close this issue now.