noreplacenot not selecting images correctly


noreplacenot not selecting images correctly

Author
Message
jrobin
jrobin
New Member
New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)

Group: Forum Members
Posts: 3, Visits: 10
I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B'). 
I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.

<picture Aimage_ABtest_P>
/ items = Aimage_P
/ position = (50%, 25%)
/ select = noreplace
</picture>

<picture Bcorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_1
/ vposition = 75%
/ select = current(Aimage_ABtest_P)
</picture>

<picture Bincorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_2
/ vposition = 75%
/ select = noreplacenot(Aimage_ABtest_P)
</picture>

<trial ABtest_P>
/ validresponse = ("1","3")
/ beginresponsetime = 2500
/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]
/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]
/ timeout = 6000
/ iscorrectresponse=[(values.hpos_1 == 25% && trial.ABtest_P.response == 2) || (values.hpos_1 == 75% && trial.ABtest_P.response == 4)]
</trial>

Attachments
practice_script.iqx (13 views, 4.00 KB)
Dave
Dave
Supreme Being
Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)

Group: Administrators
Posts: 9.3K, Visits: 41K
jrobin - Wednesday, January 23, 2019
I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B'). 
I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.

<picture Aimage_ABtest_P>
/ items = Aimage_P
/ position = (50%, 25%)
/ select = noreplace
</picture>

<picture Bcorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_1
/ vposition = 75%
/ select = current(Aimage_ABtest_P)
</picture>

<picture Bincorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_2
/ vposition = 75%
/ select = noreplacenot(Aimage_ABtest_P)
</picture>

<trial ABtest_P>
/ validresponse = ("1","3")
/ beginresponsetime = 2500
/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]
/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]
/ timeout = 6000
/ iscorrectresponse=[(values.hpos_1 == 25% && trial.ABtest_P.response == 2) || (values.hpos_1 == 75% && trial.ABtest_P.response == 4)]
</trial>

With noreplacenot you're sampling without replacement. Now suppose only one item is left in the pool for <picture Bincorr_ABtest_P> after X trials. Then that image will be sample -- because you are sampling without replacement -- regardless of whether it satisfies the "not" constraint. In other words, "noreplace" takes precedent over "not" in situations where it's not possible to satisfy both.

If you want to avoid this, you could sample *with* replacement instead.

jrobin
jrobin
New Member
New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)

Group: Forum Members
Posts: 3, Visits: 10
Dave - Wednesday, January 23, 2019
jrobin - Wednesday, January 23, 2019
I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B'). 
I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.

<picture Aimage_ABtest_P>
/ items = Aimage_P
/ position = (50%, 25%)
/ select = noreplace
</picture>

<picture Bcorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_1
/ vposition = 75%
/ select = current(Aimage_ABtest_P)
</picture>

<picture Bincorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_2
/ vposition = 75%
/ select = noreplacenot(Aimage_ABtest_P)
</picture>

<trial ABtest_P>
/ validresponse = ("1","3")
/ beginresponsetime = 2500
/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]
/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]
/ timeout = 6000
/ iscorrectresponse=[(values.hpos_1 == 25% && trial.ABtest_P.response == 2) || (values.hpos_1 == 75% && trial.ABtest_P.response == 4)]
</trial>

With noreplacenot you're sampling without replacement. Now suppose only one item is left in the pool for <picture Bincorr_ABtest_P> after X trials. Then that image will be sample -- because you are sampling without replacement -- regardless of whether it satisfies the "not" constraint. In other words, "noreplace" takes precedent over "not" in situations where it's not possible to satisfy both.

If you want to avoid this, you could sample *with* replacement instead.

Thanks for the response, and the help! This does solve the problem of the same picture being shown twice, but it doesn't control the number of times each picture is shown as the wrong answer. (So some may only appear once, as the right answer, and others appear multiple times.) Is there a way to control this too? 
Dave
Dave
Supreme Being
Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)Supreme Being (568K reputation)

Group: Administrators
Posts: 9.3K, Visits: 41K
jrobin - Wednesday, January 23, 2019
Dave - Wednesday, January 23, 2019
jrobin - Wednesday, January 23, 2019
I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B'). 
I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.

<picture Aimage_ABtest_P>
/ items = Aimage_P
/ position = (50%, 25%)
/ select = noreplace
</picture>

<picture Bcorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_1
/ vposition = 75%
/ select = current(Aimage_ABtest_P)
</picture>

<picture Bincorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_2
/ vposition = 75%
/ select = noreplacenot(Aimage_ABtest_P)
</picture>

<trial ABtest_P>
/ validresponse = ("1","3")
/ beginresponsetime = 2500
/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]
/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]
/ timeout = 6000
/ iscorrectresponse=[(values.hpos_1 == 25% && trial.ABtest_P.response == 2) || (values.hpos_1 == 75% && trial.ABtest_P.response == 4)]
</trial>

With noreplacenot you're sampling without replacement. Now suppose only one item is left in the pool for <picture Bincorr_ABtest_P> after X trials. Then that image will be sample -- because you are sampling without replacement -- regardless of whether it satisfies the "not" constraint. In other words, "noreplace" takes precedent over "not" in situations where it's not possible to satisfy both.

If you want to avoid this, you could sample *with* replacement instead.

Thanks for the response, and the help! This does solve the problem of the same picture being shown twice, but it doesn't control the number of times each picture is shown as the wrong answer. (So some may only appear once, as the right answer, and others appear multiple times.) Is there a way to control this too? 

The only way to control this is to define all the combinations you want and then sample from those combinations. I.e. don't use "not" constraints, don't sample with replacement, define fixed combinations satisfying the property "every image is supposed to an equal number of times, and each image is supposed to serve as the correct answer once, and as incorrect answer in a different instance."

jrobin
jrobin
New Member
New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)New Member (14 reputation)

Group: Forum Members
Posts: 3, Visits: 10
Dave - Wednesday, January 23, 2019
jrobin - Wednesday, January 23, 2019
Dave - Wednesday, January 23, 2019
jrobin - Wednesday, January 23, 2019
I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B'). 
I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.

<picture Aimage_ABtest_P>
/ items = Aimage_P
/ position = (50%, 25%)
/ select = noreplace
</picture>

<picture Bcorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_1
/ vposition = 75%
/ select = current(Aimage_ABtest_P)
</picture>

<picture Bincorr_ABtest_P>
/ items = Bimage_P
/ hposition = values.hpos_2
/ vposition = 75%
/ select = noreplacenot(Aimage_ABtest_P)
</picture>

<trial ABtest_P>
/ validresponse = ("1","3")
/ beginresponsetime = 2500
/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]
/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]
/ timeout = 6000
/ iscorrectresponse=[(values.hpos_1 == 25% && trial.ABtest_P.response == 2) || (values.hpos_1 == 75% && trial.ABtest_P.response == 4)]
</trial>

With noreplacenot you're sampling without replacement. Now suppose only one item is left in the pool for <picture Bincorr_ABtest_P> after X trials. Then that image will be sample -- because you are sampling without replacement -- regardless of whether it satisfies the "not" constraint. In other words, "noreplace" takes precedent over "not" in situations where it's not possible to satisfy both.

If you want to avoid this, you could sample *with* replacement instead.

Thanks for the response, and the help! This does solve the problem of the same picture being shown twice, but it doesn't control the number of times each picture is shown as the wrong answer. (So some may only appear once, as the right answer, and others appear multiple times.) Is there a way to control this too? 

The only way to control this is to define all the combinations you want and then sample from those combinations. I.e. don't use "not" constraints, don't sample with replacement, define fixed combinations satisfying the property "every image is supposed to an equal number of times, and each image is supposed to serve as the correct answer once, and as incorrect answer in a different instance."

Ok thanks!

GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search