-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fixed need for intercept #62
Conversation
Codecov Report
@@ Coverage Diff @@
## master #62 +/- ##
==========================================
+ Coverage 83.24% 84.16% +0.92%
==========================================
Files 18 18
Lines 1552 1554 +2
==========================================
+ Hits 1292 1308 +16
+ Misses 260 246 -14
Continue to review full report at Codecov.
|
# Only way I found to sort is using intercept values | ||
models.sort(key=lambda x: x[0].estimator.intercept_) | ||
fitted.sort(key=lambda x: x[0].fold) | ||
models, resets = list(zip(*fitted)) |
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.
Little bit confused by what this line does
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.
It's a little trick to turn a list of lists/tuples into two lists:
x = [("a", 1), ("b", 2), ("c", 3)]
y, z = list(zip(*x))
print(y)
# ["a", "b", "c"]
print(z)
# [1, 2, 3]
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.
Changes look good! I just had a question about the purpose regarding one line of code and a super minor suggestion (all in brew.py
) but otherwise everything makes sense!
…t' into 'develop' refactor implementation of psms streaming object Closes #62 See merge request msaid/chimerys/mokapot!51
This PR resolves Issue #61 and does a little bit of cleaning in the
mokapot.brew()
function.The CV fold that
mokapot.Model()
objects are fit to is now recorded during the fitting process. This means we can successfully recover the order of trained models using the recorded folds.