Calculating a cognitive task score using map, filter, and reduce #2502
tpronk
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes you need to score a task online, for instance, to give feedback to a participant. This repo serves as a tutorial on how to score tasks using JavaScript's map, filter, and reduce. It currently features a single task scoring algorithm, a "VPT Difference of Means score", with the output tested against a unit test of my splithalfr package.
Note this tutorial isn't specifically for jsPsych, but for any software that collects trial data as an array as objects, e..g
[{trial: 0, rt: 123, response: "left"}, {trial: 1, rt: 456, response: "right"}, ...]
. For jsPsych, you could plug the scoring algorithm into thedataFilter
of the pavlovia-plugin.Beta Was this translation helpful? Give feedback.
All reactions