-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adds __repr__ for our custom classes #286
Conversation
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.
thanks for the first pass at this!
I added a couple of comments. I would include a max depth or something similar for additive bases in the repr.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## development #286 +/- ##
===============================================
+ Coverage 96.13% 97.40% +1.26%
===============================================
Files 34 35 +1
Lines 2642 2850 +208
===============================================
+ Hits 2540 2776 +236
+ Misses 102 74 -28 ☔ View full report in Codecov by Sentry. |
Added Features
|
…r-models into repr
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.
Should probably add a doctest for at least the GLM (if not also regularizer and observation models?)
There are other notes scattered throughout
Most recent change adds label to the repr. This only affects basis right now (others don't have a label param). Questions about that:
|
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.
Co-authored-by: William F. Broderick <[email protected]>
Co-authored-by: William F. Broderick <[email protected]>
Co-authored-by: William F. Broderick <[email protected]>
Co-authored-by: William F. Broderick <[email protected]>
Co-authored-by: Sarah Jo Venditto <[email protected]>
This adds a
__repr__
method for our custom classes: basis, glm, observation models, and regularizers. The logic for almost all of these are included in the newnmo.utils.format_repr
function, summarized as:TransformerBasis and CompositeBasis are different:
Transformer(self.basis)
and same for Multiplicative, with composites of composites using additional tab indenting