glm-tools / pyglmnet

Python implementation of elastic-net regularized generalized linear models
http://glm-tools.github.io/pyglmnet/
MIT License
279 stars 83 forks source link

Tests for API, more input checks #284

Closed tommyod closed 5 years ago

tommyod commented 5 years ago
codecov-io commented 5 years ago

Codecov Report

Merging #284 into master will increase coverage by 0.41%. The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #284      +/-   ##
==========================================
+ Coverage   73.74%   74.16%   +0.41%     
==========================================
  Files           4        4              
  Lines         617      627      +10     
  Branches      124      128       +4     
==========================================
+ Hits          455      465      +10     
  Misses        123      123              
  Partials       39       39
Impacted Files Coverage Δ
pyglmnet/pyglmnet.py 80.08% <86.66%> (+0.4%) :arrow_up:

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 a80848c...cf2590e. Read the comment docs.

tommyod commented 5 years ago

Thank you for the prompt review @jasmainak ! I've addressed some of the comments in a commit, and would like to discuss the rest.

The main reason why I added the smoke-tests was because I was figuring out the API, and I wanted to solidify it in the code somewhere. It was hard to get started with the code, since:

Adding API usage as a that might have been the wrong approach. Instead, I propose:

Running examples on travis CI is important, if not they might diverge from the code in the future. Thoughts on the approach sketched above?

jasmainak commented 5 years ago

The code in the master README does not run with code from the master.

PR to fix this would be welcome :)

There are no short examples in docstrings showing usage.

again, PR is welcome!

There's an examples folder, but the examples are very long and contain dependencies, i.e. from spykes.ml.strf import STRF

yes, I know it's a little unfortunate. I am also not sure know how much spykes is maintained. Do you know other data that could be used to demonstrate the same functionality? Tikhonov regularization in this case ...

Running examples on travis CI is important, if not they might diverge from the code in the future.

Currently we do have CircleCI for examples. I'm not quite sure why it's not getting triggered on PRs.

jasmainak commented 5 years ago

okay I think I fixed the CircleCI issue. If you make a push, it should run CircleCI

tommyod commented 5 years ago

@jasmainak , I've:

I believe this PR is good to go. CircleCI is failing, seemingly because plot_group_lasso.py takes too long. Seems unrelated to this PR.

tommyod commented 5 years ago
jasmainak commented 5 years ago

Merged @tommyod . Thanks!

Let's iterate on the issue with the coefficient in another PR -- it seems unrelated to the changes in this PR.

I had to squash because you had a merge commit in your history. Next time rebase instead of merging or pulling to avoid that.