Result
result.models#
Result
#
Bases: Model
A model to register participant responses to the database.
Note
a Result can be either tied to a Session, which is the common way to log responses to tasks during an experiment, or to a Participant, which can be a consent form or a demographic question.
Attributes:
Name | Type | Description |
---|---|---|
session |
Optional[Session]
|
session for which this result will be registered |
participant |
Optional[Participant]
|
participant for which this result will be registered |
section |
Optional[Section]
|
a section tied to the result, usually applicable for Trials with Playback |
created_at |
datetime
|
a timestamp, set automatically at creation time |
question_key |
str
|
a description by which to identify the result during analysis |
expected_response |
str
|
if there is a correct response for a given Trial, it can be logged here |
given_response |
str
|
set as a result of the participant’s response |
comment |
str
|
optional comment to help analysis |
score |
float
|
numerical value to reflect the participant’s success |
scoring_rule |
str
|
a key by which scores can be induced from expected and given response from scoring_rules |
json_data |
dict
|
a field to log additional information to help analysis |
Source code in result/models.py
save_json_data(data)
#
Merge data with json_data, overwriting duplicate keys.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
dict
|
dictionary of data to merge into the |
required |