ContextLab / quail

A python toolbox for analyzing and plotting free recall data
http://cdl-quail.readthedocs.io/en/latest/
MIT License
20 stars 10 forks source link

package functions #5

Closed andrewheusser closed 7 years ago

andrewheusser commented 7 years ago

Posting here so we can discuss and add to this, and maybe use the project board to keep track of progress?

andrewheusser commented 7 years ago

recall_matrix

inputs: presentedWords- list of lists, in order of presentation ecalledWords- list of lists, in order of recall

output: list of lists, recall matrix (recall word never presented --> 0) (recall word from previous list --> negative value)

spc (serial position curve)

inputs: recall_matrix, number of words presented in each list optional args: plot=True/False

output (plot=True): plot of probability of a word being recalled given presentation position output (plot=False): list of probabilities

pfr (prob first recall)

inputs: recall_matrix, number of words presented in each list optional args: plot=True/False

output (plot=True): plot of probability of a word being recalled first, given presentation position output (plot=False): list of probabilities

plr (prob last recall)

inputs: recall_matrix, number of words presented in each list optional: plot=True/False

output (plot=True): plot of probability of a word being recalled last, given presentation position output (plot=False): list of probabilities

lag crp

under construction!

additional features?

for each function: option toaverage over an array of participant data? plotting options? whole package: option to run all functions on a list of participants and output report?

jeremymanning commented 7 years ago

i think we also want functions related to clustering (memory fingerprints), possibly copied or "inspired" from the memory fingerprint repo.

jeremymanning commented 7 years ago

another way to set this up would be to have just two main functions in the toolbox: analyze and plot. A type flag can (internally) select which type of analysis/plot is generated. So rather than

spc = pyr.spc(pyro) ax = pyr.plot(spc),

we'd have

spc = pyr.analyze(pyro, type='spc') ax = pyr.plot(spc, type='spc') (or ax = pyr.plot(spc), if there's some internal variable in the spc object that plot has access to in order to determine which type of plot to make)

andrewheusser commented 7 years ago

^ either way is fine by me. the separate functions maybe be a little more flexible when it comes to adding new/custom analyses, but other than that they seem pretty comparable

jeremymanning commented 7 years ago

i like the idea of having just two main functions, analyze and plot (and then adding flags as we add new analyses), assuming it's easy to set it up like that.

andrewheusser commented 7 years ago

very easy to implement this design, however I believe Kirsten is working on the reports right now using the other API. Should we leave this open and come back to it when we refactor and documentation/examples?

jeremymanning commented 7 years ago

sounds good

andrewheusser commented 7 years ago

closing this and opening 2 new issues to 1) support fingerprint analyses in pyrec and 2) refactor pyrec into two main functions: analyze and plot