-
Notifications
You must be signed in to change notification settings - Fork 34
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
Profile format changed to be less tall and more wide, like mAFQ #279
Conversation
@@ -192,7 +192,7 @@ def test_AFQ_data_waypoint(): | |||
'sub-01_sess-01_dwi_space-RASMM_model-DTI_desc-det-AFQ-clean_tractography_idx.json')) # noqa | |||
|
|||
tract_profiles = pd.read_csv(myafq.tract_profiles[0]) | |||
assert tract_profiles.shape == (800, 5) | |||
assert tract_profiles.shape == (400, 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Why are there only half the numbers here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two columns were removed: scalar and profile. scalar was the label (ie "dti_fa") and profile was the number. Now, instead, there are two columns of numbers: "dti_md", "dti_fa". This means it is only half the length. For each node, there is only one row instead of one for each scalar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha! That makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I am not sure that I like this change. Maybe we should change the way things get converted from mAFQ into AFQ-Insight instead? WDYT @richford? Is there any particular reason to prefer long over wide or vice versa?
No reason other than the appeal to tidy data. That's just the format that we used for AFQ-Browser and AFQ-Insight. Inside of AFQ-insight, we want the feature matrix to be wide (n x p, where n in the number of subjects and p is the number of features), but I can definitely do that conversion inside of AFQ-Insight. I don't remember if we had good reasons to prefer the wide format inside of AFQ-Browser other than the appeal to tidy data. |
Sorry for the lingo. I'm referring to this definition of tidy. Hadley gets extra points for the Tolstoy quote. |
OK - sounds good. Let's go with the wide format proposed here (and already implemented in AFQ-Browser and AFQ-Insight). Only still need to understand the changes introduced in the tests, but otherwise, LGTM. |
With that question, I believe this is ready to merge? Is it rebased on master? |
I just rebased it. I believe it can merge when these checks complete. |
Instead of a scalar column with the names "dti_fa", "dti_md" and a profiles column with their corresponding values, each scalar gets its own column. closes #277