Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Project 2: Math is Hard As we discussed in class, in addition to controlling the aperture of the eye, the pupils also reflect the push and pull between the parasympathetic and sympathetic nervous systems

Project 2: Math is Hard As we discussed in class, in addition to controlling the aperture of the eye, the pupils also reflect the push and pull between the parasympathetic and sympathetic nervous systems

Computer Science

Project 2: Math is Hard
As we discussed in class, in addition to controlling the aperture of the eye, the pupils also reflect
the push and pull between the parasympathetic and sympathetic nervous systems. Dilation
reflects more sympathetic (fight or flight) outflow vs constriction which represents more
parasympathetic (rest and digest) activity. It turns out that giving people a math task often
triggers a reflexive sympathetic response which can be observed through pupil dilation. Our
next project will examine this kind of data.
Project Description:
You have 5 weeks to complete this project. I am adding a week since Thanksgiving and Indian
Heritage Day are within this time period. Steps 1 and 2 are due on 16 November; Steps 3 and 4
are due on 7 December. There will be at least 2 in class work days 2 November and 14
November. Each student is responsible for turning in their own, individual project. I do not mind
if you work together, however each of you is responsible for submitting your project.
For the work that is due on 16 November, I am requiring a written report with figures that
discusses your approach to the data. At a minimum you should have 1 figure for Step 1 with all
axes labeled, appropriate legends, and a figure caption. For Step 2 there should be a minimum
of 3 figures (1-average of all pupil responses, 2-average of pupil responses for easy/hard,
3-average of pupil responses for wrong/right).
For the work due on 30 November I expect the following. For Step 3, I again would like a
written report. I would like to see example plots of the features you extracted on the pupil time
series and a brief description of the algorithm you developed to find that feature. In addition, I
would like to see plots of the mean and standard deviation of your feature values according to
reaction times, difficulty of the problem, and whether the participants were right or wrong.
Finally, you should also show some plots of your model performance (predictions versus actual).
For Step 4, all that you need to provide are your predictions (see below).
Grading will be based on the reports and the thought process put behind your algorithms. It will
NOT depend on your prediction accuracy, although I will maintain an ongoing tally of model
performances as a part of a fun competition.
Graduate students: You have an extra assignment in this project. You may have until the last
day of class to submit that portion, 12 December. For that I would like you to send me your
predictions, a brief description of your algorithm, and your code.
Experiment Description:
In the modular arithmetic task participants completed 40 trials consisting of math statements in
which participants were asked to divide two numbers and respond true if the remainder was
divisible by the modulo (e.g. 7), and false if not. Difficulty was manipulated by including
subtractions that involved the carrying operation (e.g. 71 ≅ 43 (mod 8)). Stimuli were presented
for 8 seconds or until a response was made, whichever occurred first. Feedback was given to
participants in the form of a green cross for correct or red cross for incorrect trials, and the cross
remained on the screen for 2 seconds. The inter-stimulus-interval consisted of a blank screen
randomly presented for 4.5–13.75 seconds.
Data Description:
There are 3 folders: Behavioral Data, Pupil Data, and Test Data. The first two folders contain
matching subject IDs for each subject. The first file contains the pupillometry data. There is a
column for time (in milliseconds) and a column for the diameter of the pupil (in mm). The
second file contains the behavioral data. The columns in that file are 1) Time that the stimulus
was presented (in ms), 2) Reaction Time (in ms), 3) Difficulty (1 = Easy, 2 = Hard), 4) isCorrect
(0 = False, 1 = True). To be clear, the 4th column 0 means the person got the question wrong
and 1 means they got the question right.
For all of you, I have also provided test files. These test files will have the response time,
difficulty, and accuracy information stripped from them, but they will have the stimulus times and
pupil diameters. From these files you will generate predictions.
Graduate Students: I will also have a file that is simply a pupil diameter time series. With that
you should try to predict stimulus onset times.
Project Steps:
Step 1: Inspect the data. These data have been preprocessed for you. This means that eye
blinks have been removed and interpolated. Regardless please make sure you loop through
the data and see if there are any anomalies. For this step, please provide example plots of the
data and if you identify any outliers/anomalies please show those and what you decided to do
with them. It is OK if you decide to not do anything about them if they happen infrequently or
are not occurring in your time period of analysis. If you decide to do more pre-processing here
are some great references (and also please provide these plots):
https://link.springer.com/article/10.3758/s13428-022-01957-7
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5809553/
Step 2: Examine the pupil response. Plot the start and stop (stimulus onset + response time) or
(stimulus onset + 8 secs) of a trial for each subject with the pupil diameters superimposed. Do
you see any relationship between the trial start and trial stop and the pupil size? Next plot the
average pupil response for the onset of a trial. For this step, it may be necessary to baseline
the pupil size using the pupil size at the onset of the stimulus. This means subtract the first
value of the pupil size at the time of stimulus onset from all subsequent values. Next make plots
that compare the pupil response for incorrect/correct responses and easy/hard responses. Do
you see any differences here?
Step 3: Extract and model features from the pupil response. At a minimum consider the
following features 1) latency to peak pupil response, 2) value of the peak pupil response. You
will need to write an algorithm that finds these features after the onset of a stimulus. Compare
the values of these features: reaction time, accuracy (if they got the response correct) and
difficulty of the question. In other words, can the pupil response features you measure be used
to predict the response time, accuracy, and/or difficulty of the question. I would also encourage
you to use baseline pupil diameter (the value at stimulus onset) as a factor in your model. The
easiest way to do this is with a generalized linear model but you may use any type of model you
wish.
Step 4: Provide your predictions. Once you have trained your model, use the test data to
generate predictions of response time, question difficulty, and accuracy. You may submit your
responses as many times as you like before the deadline and I will provide you with
performance feedback. I will note that the dataset (much like many in real life) is unbalanced,
there are many more correct trials than there are incorrect trials. However, the difficulty is
equally balanced.
Step 5 (graduate students and ambitious undergraduates): Most of the stimuli produce very
large pupil responses, especially compared to the background activity. For this step, I would like
you to find unique features of the pupil response to the math task (time and/or frequency
domain). Using these features, try to predict the stimulus onset time. At a high level, this will
involve identifying pupil responses, and using the pupil latency features (or a model of it) to
predict the time at which a stimulus is presented. This is a challenging task.
Additional considerations:
1) You can examine other features.
a) There are time/frequency ones: “For example: “Nakayama and Shimizu (2002 &
2004) found the power spectrum density of the pupil size data between 0.1-0.5
Hz and 1.6 -3.5 Hz to increased with the difficultly mental arithmetic”
b) There are also other kinematic variables like velocity, acceleration, pupil
response time (when it begins monotonically increasing to the peak dilation)
2) You can model other components of this:
a) Can you predict the response time before the actual response itself? Maybe
utilizing the pupil response time, baseline pupil size?

Option 1

Low Cost Option
Download this past answer in few clicks

23.99 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE