Skip to content

Distributed estimation - #3396

Merged
josef-pkt merged 20 commits into
statsmodels:masterfrom
lbybee:distributed_estimation_rebased0
Feb 9, 2017
Merged

josef-pkt merged 20 commits into
statsmodels:masterfrom
lbybee:distributed_estimation_rebased0

Conversation

@lbybee

@lbybee lbybee commented Jan 27, 2017

Copy link
Copy Markdown
Contributor

See #3055 and #3395 for reference.

@lbybee

lbybee commented Jan 27, 2017

Copy link
Copy Markdown
Contributor Author

@kshedden this should be ready to merge now. @josef-pkt thanks for the advise on the rebasing, worked well.

@josef-pkt

Copy link
Copy Markdown
Member

The squashing looks good, but you didn't rebase on master. master is merged in the last commit into this branch.
According to the network graph, this branch still starts at some point in the past, behind master.

I think you could rebase this branch on master without needing any additional interactive squashing or history adjustments.

lbybee added 18 commits January 27, 2017 14:25
…used elsewhere

add get_prediction to phreg

fix bugs in phreg prediction

update reversion argument and modify duration tests

fix bunch

fix endog

correct source for endog

add Kerby's changes

small fix

remove unnecessary test

remove endog error

use model endog if not provided

Revert "use model endog if not provided"

This reverts commit 986aead.

fix small bug

exog bug

replace endog with exog

revert

remove kwargs

Revert "remove kwargs"

This reverts commit 9d3efe3.

alter predict to return result for lhr before things break

handle other phreg options

stupid syntax mistake

modify prediction to handle PHReg case

generalize cov_params to remove PHReg specific aspects from get_prediction
remove some old code
add comments to remaining dist functions and remove testing file

test revert

remove Phreg predict commits from branch

minor fixes

fix tests
fix tests

update hessian_obs docstrings

update gradient and docstrings

fix failing tests
update fit_partition to work with joblib by moving outside of DistributedModel

update fit_partition to work with joblib by moving outside of DistributedModel

update joblib import and remove bug

update to use statsmodels.tools.parallel for joblib
fix small issue in refactoring
fix small error

fix results_l

correctly link fit_distributed

remove duplicate tests
fix bugs, minor refactoring and add tests

update to correct version of regularized_covariance

replace distributed test comparisons with L2 norm
integrate results

remove testing file
move data_generator to fit and add init_kwds_generator (for WLS and GLS)

update notebook to reflect changes to DistributedModel and fit

flake8 check
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.04%) to 88.114% when pulling d2b1101 on lbybee:distributed_estimation_rebased0 into 792a3c5 on statsmodels:master.

@lbybee
lbybee force-pushed the distributed_estimation_rebased0 branch from d2b1101 to add1ccd Compare January 27, 2017 19:33
@lbybee

lbybee commented Jan 27, 2017

Copy link
Copy Markdown
Contributor Author

Ok, now there is an issue with the reverted PHreg changes being reintroduced. I'm aware of it and working on it.

add partition tests

minor mistake

clean assertion

clean partition tests

update tests and fix flake8

update test doc strings and force rebuild

redo test comments for clarity

fix pep8

rever phreg changes
@lbybee
lbybee force-pushed the distributed_estimation_rebased0 branch from add1ccd to 44240e7 Compare January 27, 2017 20:05
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.04%) to 88.114% when pulling 44240e7 on lbybee:distributed_estimation_rebased0 into 792a3c5 on statsmodels:master.

@lbybee

lbybee commented Jan 28, 2017

Copy link
Copy Markdown
Contributor Author

I believe that this should now be correctly rebased.

@josef-pkt

Copy link
Copy Markdown
Member

network graph looks good, it's now rebased on master.

PHReg is still in there. It can stay in there, if it's used during development and doesn't hurt much the PHReg history, from my perspective. Or I can do some surgery. But it would mean editing quite a bit of the commits.

https://github.com/lbybee/statsmodels/commits/44240e786b7a06d3dfe2c9986323608a94a3f5a5/statsmodels/duration/hazard_regression.py

@josef-pkt

Copy link
Copy Markdown
Member

About the unit tests: they look ok, but for my taste it has too many shape tests.

a relatively easy way to convert to regression test and to add regression numbers would be to use
nosetests --pdb-failures <path_to>/statsmodels/base/tests/test_distributed_estimation.py

add the asserts and copy the values from the test failure into the unit test, e.g.

assert_equal(dmat.shape, X.shape)
assert_allclose(dmat, np.ones(X.shape), rtol=1e-6)

@josef-pkt

Copy link
Copy Markdown
Member

@lbybee Thanks, looks good
If you can amend the last commit, then you could add a code comment to the test functions, that those unit tests are regression tests. i.e. reference numbers are results from functions.
That's usually very helpful when we have to look at and possibly change those tests later.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.04%) to 88.111% when pulling f4b3913 on lbybee:distributed_estimation_rebased0 into 792a3c5 on statsmodels:master.

@lbybee
lbybee force-pushed the distributed_estimation_rebased0 branch from 03795f7 to d1cbe5c Compare January 30, 2017 15:47
@lbybee

lbybee commented Jan 30, 2017

Copy link
Copy Markdown
Contributor Author

Ok, I believe this should all be correct now. @kshedden should be ready to merge whenever you want at this point.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.04%) to 88.112% when pulling d1cbe5c on lbybee:distributed_estimation_rebased0 into 792a3c5 on statsmodels:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.04%) to 88.112% when pulling d1cbe5c on lbybee:distributed_estimation_rebased0 into 792a3c5 on statsmodels:master.

@kshedden

kshedden commented Feb 7, 2017

Copy link
Copy Markdown
Contributor

@josef-pkt This looks good to me. If we merge it in we can experiment some more and do a follow-up PR if needed.

@josef-pkt

Copy link
Copy Markdown
Member

Looks good based on brief skimming.
It's a bit behind master given the recent activity, but should be fine to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants