Skip to content
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

Add parameter to allow equal weight during HPAL level 1 iteration. #532

Merged
merged 3 commits into from
Oct 26, 2017

Conversation

feilong
Copy link
Contributor

@feilong feilong commented Aug 1, 2017

If this looks good to you I'll also update searchlight_hyperalignment.py to make similar changes to SL HA. @yarikoptic @swaroopgj

@coveralls
Copy link

coveralls commented Aug 1, 2017

Coverage Status

Coverage decreased (-0.009%) to 80.056% when pulling b9baeab on feilong:ha-equal-weight into 56d8861 on PyMVPA:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 79.95% when pulling b9baeab on feilong:ha-equal-weight into 56d8861 on PyMVPA:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 79.95% when pulling b9baeab on feilong:ha-equal-weight into 56d8861 on PyMVPA:master.

@codecov-io
Copy link

codecov-io commented Aug 1, 2017

Codecov Report

Merging #532 into master will decrease coverage by 1.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #532      +/-   ##
==========================================
- Coverage   76.66%   75.63%   -1.04%     
==========================================
  Files         364      363       -1     
  Lines       41341    41370      +29     
  Branches     6667     6672       +5     
==========================================
- Hits        31695    31289     -406     
- Misses       7751     8231     +480     
+ Partials     1895     1850      -45
Impacted Files Coverage Δ
mvpa2/algorithms/hyperalignment.py 95.98% <100%> (+0.09%) ⬆️
mvpa2/tests/test_hyperalignment.py 97.8% <100%> (+0.19%) ⬆️
mvpa2/tests/test_svmkernels.py 5.94% <0%> (-94.06%) ⬇️
mvpa2/tests/test_lars.py 10% <0%> (-83.34%) ⬇️
mvpa2/clfs/sg/sens.py 20% <0%> (-66.16%) ⬇️
mvpa2/clfs/lars.py 29.06% <0%> (-58.14%) ⬇️
mvpa2/support/scipy/signal.py 11.36% <0%> (-47.73%) ⬇️
mvpa2/clfs/sg/svm.py 15.71% <0%> (-45.36%) ⬇️
mvpa2/kernels/sg.py 47% <0%> (-44%) ⬇️
mvpa2/tests/test_kernel.py 62.02% <0%> (-34.82%) ⬇️
... and 45 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56d8861...9b92c92. Read the comment docs.

@nno
Copy link
Contributor

nno commented Aug 2, 2017

Could you add some unit test code to test the new feature please?

@coveralls
Copy link

coveralls commented Aug 3, 2017

Coverage Status

Coverage decreased (-0.007%) to 80.058% when pulling efa20a5 on feilong:ha-equal-weight into 56d8861 on PyMVPA:master.

ha = Hyperalignment(ref_ds=ref_ds,
zscore_all=zscore_all,
zscore_common=zscore_common)
zscore_common=zscore_common,
level1_equal_weight=level1_equal_weight)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is a start! ;) although too expensive one I must say, but how do we know that the "logic" is actually working? ;-)

@feilong could you please add a simple test for mean_xy which would demonstrate that if we provide similar to the ones used in the code weighting, it would produce the desired equivalently balanced contribution?
I know that it sounds "not that interesting", but that is why they are called "unit-tests".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, just added a new commit with the tests for mean_xy.

@coveralls
Copy link

coveralls commented Oct 26, 2017

Coverage Status

Coverage increased (+0.05%) to 80.113% when pulling 9b92c92 on feilong:ha-equal-weight into 56d8861 on PyMVPA:master.

@feilong
Copy link
Contributor Author

feilong commented Oct 26, 2017

ERROR: mvpa2.tests.test_misc_scatter.test_plot_scatter
That's not my code, Travis CI!

@@ -430,7 +437,12 @@ def _level1(self, datasets, commonspace, ref_ds, mappers, residuals):
# to make a batch update after processing all 1st-level datasets
# to an identical 1st-level common space
# TODO: make just a function so we dont' waste space
commonspace = params.combiner1(ds_, commonspace)
if params.level1_equal_weight:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the TODO still applicable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

who knows... probably still is (for "inplace" zscoring, right @swaroopgj?), but it is unrelated to this PR

@yarikoptic
Copy link
Member

That's not my code, Travis CI!

yeap, not your fault... for now just restarted that run, let's pretend it didn't happen for now ;-)

@yarikoptic
Copy link
Member

Seems to be LGTM, will merge

@yarikoptic yarikoptic merged commit 5596056 into PyMVPA:master Oct 26, 2017
@nno
Copy link
Contributor

nno commented Oct 27, 2017

That's not my code, Travis CI!

yeap, not your fault... for now just restarted that run, let's pretend it didn't happen for now ;-)

I raised an issue, let's keep an eye on it.
#546

@feilong feilong deleted the ha-equal-weight branch October 27, 2017 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants