8000 Change AutoContrasts to DummyContrasts by adelavega · Pull Request #197 · poldracklab/fitlins · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change AutoContrasts to DummyContrasts #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/examples/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The ``Model.X`` section demonstrates selection of regressors for the design
matrix, and ``Contrasts`` shows how to perform a simple contrast between
two conditions.

At the ``dataset`` level, the ``AutoContrasts`` option demonstrates taking
At the ``dataset`` level, the ``DummyContrasts`` option demonstrates taking
a simple mean at the group level.

.. raw:: html
Expand Down
2 changes: 1 addition & 1 deletion docs/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ In this case, we can use an ``AutoContrast`` to make a very simple final step:

{
"Level": "Dataset",
"AutoContrasts": ["a_vs_b"]
"DummyContrasts": ["a_vs_b"]
}

This is equivalent to the more verbose:
Expand Down
10 changes: 8 additions & 2 deletions examples/models/ds000003/models/model-001_smdl.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
"a_comp_cor_03", "a_comp_cor_04", "a_comp_cor_05"
]
},
"AutoContrasts": ["trial_type.word", "trial_type.pseudoword"],
"DummyContrasts": {
"Conditions": ["trial_type.word", "trial_type.pseudoword"],
"Type": "t"
},
"Contrasts": [
{
"Name": "word_gt_pseudo",
Expand All @@ -54,7 +57,10 @@
},
{
"Level": "dataset",
"AutoContrasts": ["word_gt_pseudo", "task_vs_baseline"],
"DummyContrasts": {
"Conditions": ["word_gt_pseudo", "task_vs_baseline"],
"Type": "t"
},
"Contrasts":[
{
"Name": "any_words",
Expand Down
5 changes: 4 additions & 1 deletion examples/models/ds000030/models/model-001_smdl.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@
},
{
"Level": "dataset",
"AutoContrasts": ["accept_vs_explode"]
"DummyContrasts": {
"Conditions": ["accept_vs_explode"],
"Type": "t"
}
}
]
}
5 changes: 4 additions & 1 deletion examples/models/ds000114/models/model-001_smdl.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@
},
{
"Level": "dataset",
"AutoContrasts": ["session_diff"]
"DummyContrasts": {
"Conditions": ["session_diff"],
"Type": "t"
}
}
]
}
10 changes: 8 additions & 2 deletions examples/models/ds000117/models/model-001_smdl.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@
},
{
"Level": "subject",
"AutoContrasts": ["face_vs_scram"]
"DummyContrasts": {
"Conditions": ["face_vs_scram"],
"Type": "FEMA"
}
},
{
"Level": "dataset",
"AutoContrasts": ["face_vs_scram"]
"DummyContrasts": {
"Conditions": ["face_vs_scram"],
"Type": "t"
}
}
]
}
161 changes: 94 additions & 67 deletions examples/notebooks/ds003_sample_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -312,72 +312,93 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\n",
" \"Name\": \"ds003_model001\",\n",
" \"Description\": \"\",\n",
" \"Input\": {\n",
" \"task\": \"rhymejudgment\"\n",
" },\n",
" \"Steps\": [\n",
" {\n",
" \"Level\": \"run\",\n",
" \"Transformations\": [\n",
" {\n",
" \"Name\": \"Factor\",\n",
" \"Input\": [\n",
" \"trial_type\"\n",
" ]\n",
" },\n",
" {\n",
" \"Name\": \"Convolve\",\n",
" \"Input\": [\"trial_type.word\", \"trial_type.pseudoword\"],\n",
" \"Model\": \"spm\"\n",
" }\n",
" ],\n",
" \"Model\": {\n",
" \"X\": [\n",
" \"trial_type.word\",\n",
" \"trial_type.pseudoword\",\n",
" \"framewise_displacement\",\n",
" \"tran 28BE s_x\", \"trans_y\", \"trans_z\", \"rot_x\", \"rot_y\", \"rot_z\",\n",
" \"a_comp_cor_00\", \"a_comp_cor_01\", \"a_comp_cor_02\",\n",
" \"a_comp_cor_03\", \"a_comp_cor_04\", \"a_comp_cor_05\"\n",
" ]\n",
" },\n",
" \"Contrasts\": [\n",
" {\n",
" \"Name\": \"word_gt_pseudo\",\n",
" \"ConditionList\": [\n",
" \"trial_type.word\",\n",
" \"trial_type.pseudoword\"\n",
" ],\n",
" \"Weights\": [1, -1],\n",
" \"Type\": \"t\"\n",
" },\n",
" {\n",
" \"Name\": \"task_vs_baseline\",\n",
" \"ConditionList\": [\n",
" \"trial_type.word\",\n",
" \"trial_type.pseudoword\"\n",
" ],\n",
" \"Weights\": [0.5, 0.5],\n",
" \"Type\": \"t\"\n",
" }\n",
" ]\n",
" },\n",
" {\n",
" \"Level\": \"dataset\",\n",
" \"AutoContrasts\": [\"word_gt_pseudo\", \"task_vs_baseline\"]\n",
" }\n",
" ]\n",
"}\n"
"{\r\n",
" \"Name\": \"ds003_model001\",\r\n",
" \"Description\": \"\",\r\n",
" \"Input\": {\r\n",
" \"task\": \"rhymejudgment\"\r\n",
" },\r\n",
" \"Steps\": [\r\n",
" {\r\n",
" \"Level\": \"run\",\r\n",
" \"Transformations\": [\r\n",
" {\r\n",
" \"Name\": \"Factor\",\r\n",
" \"Input\": [\r\n",
" \"trial_type\"\r\n",
" ]\r\n",
" },\r\n",
" {\r\n",
" \"Name\": \"Convolve\",\r\n",
" \"Input\": [\"trial_type.word\", \"trial_type.pseudoword\"],\r\n",
" \"Model\": \"spm\"\r\n",
" }\r\n",
" ],\r\n",
" \"Model\": {\r\n",
" \"X\": [\r\n",
" \"trial_type.word\",\r\n",
" \"trial_type.pseudoword\",\r\n",
" \"framewise_displacement\",\r\n",
" \"trans_x\", \"trans_y\", \"trans_z\", \"rot_x\", \"rot_y\", \"rot_z\",\r\n",
" \"a_comp_cor_00\", \"a_comp_cor_01\", \"a_comp_cor_02\",\r\n",
" \"a_comp_cor_03\", \"a_comp_cor_04\", \"a_comp_cor_05\"\r\n",
" ]\r\n",
" },\r\n",
" \"DummyContrasts\": {\r\n",
" \"Conditions\": [\"trial_type.word\", \"trial_type.pseudoword\"],\r\n",
" \"Type\": \"t\"\r\n",
" },\r\n",
" \"Contrasts\": [\r\n",
" {\r\n",
" \"Name\": \"word_gt_pseudo\",\r\n",
" \"ConditionList\": [\r\n",
" \"trial_type.word\",\r\n",
" \"trial_type.pseudoword\"\r\n",
" ],\r\n",
" \"Weights\": [1, -1],\r\n",
" \"Type\": \"t\"\r\n",
" },\r\n",
" {\r\n",
" \"Name\": \"task_vs_baseline\",\r\n",
" \"ConditionList\": [\r\n",
" \"trial_type.word\",\r\n",
" \"trial_type.pseudoword\"\r\n",
" ],\r\n",
" \"Weights\": [0.5, 0.5],\r\n",
" \"Type\": \"t\"\r\n",
" }\r\n",
" ]\r\n",
" },\r\n",
" {\r\n",
" \"Level\": \"dataset\",\r\n",
" \"DummyContrasts\": {\r\n",
" \"Conditions\": [\"word_gt_pseudo\", \"task_vs_baseline\"],\r\n",
" \"Type\": \"t\"\r\n",
" },\r\n",
" \"Contrasts\":[\r\n",
" {\r\n",
" \"Name\": \"any_words\",\r\n",
" \"ConditionList\": [\r\n",
" \"trial_type.word\",\r\n",
" \"trial_type.pseudoword\"\r\n",
" ],\r\n",
" \"Weights\": [\r\n",
" [1, 0],\r\n",
" [0, 1]\r\n",
" ],\r\n",
" \"Type\": \"F\"\r\n",
" }\r\n",
" ]\r\n",
" }\r\n",
" ]\r\n",
"}\r\n"
]
}
],
Expand Down Expand Up @@ -2999,15 +3020,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Bash",
"language": "bash",
"name": "bash"
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": "shell",
"file_extension": ".sh",
"mimetype": "text/x-sh",
"name": "bash"
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
},
"sos": {
"kernels": [
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ install_requires =
pandas>=0.19
tables>=3.2.1
nistats>=0.0.1b0
pybids>=0.9.4
pybids @ git+https://github.com/bids-standard/pybids.git@4cdcb0d
jinja2

[options.extras_require]
Expand Down
0