Skip to main content
United States
Jump To
Support
Register or Log In
Support
Register or Log In
Instructors
Browse Products
Getting Started
Students
Browse Products
Getting Started
Return to Research Methods Using R 1e Student Resources
Chapter 14 Multiple choice questions
Quiz Content
*
not completed
.
Download the data file for the multiple-choice questions for Chapter 14,
and open it in
R.
The array
ERPdata
contains brain activity from an EEG experiment at a single time point, in which images were shown either on the left or right of the screen. The array has three dimensions:
• Dimension 1 indexes the location (left or right)
• Dimension 2 indexes 200 trials for each condition
• Dimension 3 indexes 64 locations on the participant's head
Use the
caret
package to train a linear support vector machine to classify between locations, using the first 100 trials for each condition (do not scale the data). Then test the performance of the classifier using the remaining trials. What is the classification accuracy?
51%
correct
incorrect
71%
correct
incorrect
89%
correct
incorrect
91%
correct
incorrect
*
not completed
.
Use the
binom.test
function to calculate a binomial test for 200 observations, comparing the accuracy from Question 1 to 50% correct. Is the performance significantly above chance?
No, because the test is not significant
correct
incorrect
No, because the test is significant
correct
incorrect
Yes, because the test is not significant
correct
incorrect
Yes, because the test is significant
correct
incorrect
*
not completed
.
Try using a radial basis function kernel instead. What happens to the accuracy?
It gets better
correct
incorrect
It gets worse
correct
incorrect
It stays the same
correct
incorrect
The radial function causes an error with these data
correct
incorrect
*
not completed
.
Which of the algorithms below produces the highest accuracy?
knn
correct
incorrect
lda
correct
incorrect
qda
correct
incorrect
svmPoly
correct
incorrect
*
not completed
.
Next, rescale the data separately for each condition and electrode using the
scale
function. How does this affect the accuracy?
It is reduced to 35.5%
correct
incorrect
It stays the same
correct
incorrect
It increases to 91.5%
correct
incorrect
It increases to 94.25%
correct
incorrect
*
not completed
.
EEG data are notoriously noisy, so to improve accuracy it is common practice to average over subsets of trials. If we average over subsets of 20 trials, how many observations (averages) will there be for each condition?
2
correct
incorrect
5
correct
incorrect
10
correct
incorrect
20
correct
incorrect
*
not completed
.
The following lines of code will average successive sets of 40 trials, and create two matrices (
sampleMatrixL
and
sampleMatrixR
), each of which contains ten averages for the appropriate condition:
ntrials <- 200
trialspersample <- 20
nsamples <- ntrials/trialspersample
sampleMatrixL <- matrix(0,nrow=nsamples,ncol=64
)
sampleMatrixR <- matrix(0,nrow=nsamples,ncol=64
)
for (n in 1:nsamples){sampleMatrixL[n,] <-colMeans(ERPdata[1,(1+((n-1)*trialspersample)):(n*trialspersample),])}
for (n in 1:nsamples){sampleMatrixR[n,] <-colMeans(ERPdata[2,(1+((n-1)*trialspersample)):(n*trialspersample),])}
Train a linear support vector machine algorithm using the first five averages of each condition, and calculate its accuracy using the remaining five averages for each condition. How many averages does the algorithm get correct?
2
correct
incorrect
5
correct
incorrect
8
correct
incorrect
10
correct
incorrect
*
not completed
.
How many trials per average gives the best performance?
2
correct
incorrect
5
correct
incorrect
10
correct
incorrect
50
correct
incorrect
*
not completed
.
Another common trick in classifying EEG data is to randomly reshuffle the trials, and repeat the classification many times. This often improves accuracy, as well as increasing the granularity of the accuracy measure. Use the
sample
function to randomly permute the trial order before you calculate averages of 20 trials to use in classification. Repeat the classification 100 times with different permutations, and calculate the average accuracy. It is approximately:
66%
correct
incorrect
79%
correct
incorrect
85%
correct
incorrect
91%
correct
incorrect
*
not completed
.
Now modify the code from Question 9 so that either the first 32 or second 32 electrodes are used in the pattern analyses. Which set of electrodes gives the best classifier performance?
Electrodes 1:32
correct
incorrect
Electrodes 33:64
correct
incorrect
Both sets give equally good performance
correct
incorrect
Classifying with only 32 electrodes produces no output because of an error
correct
incorrect
Previous Question
Submit Quiz
Next Question
Reset
Exit Quiz
Review all Questions
Submit Quiz
Are you sure?
You have some unanswered questions. Do you really want to submit?
Back to top
Printed from , all rights reserved. © Oxford University Press, 2024
Select your Country