Improved docstring and added examples for Development class#834
Improved docstring and added examples for Development class#834kennethshsu wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #834 +/- ##
=======================================
Coverage 86.94% 86.94%
=======================================
Files 86 86
Lines 4994 4994
Branches 644 644
=======================================
Hits 4342 4342
Misses 462 462
Partials 190 190
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| Examples | ||
| -------- | ||
|
|
||
| There are lots of parameters to control the development pattern selection. |
There was a problem hiding this comment.
it's difficult to appreciate these examples by examining the estimate ldf_. it would be more instructive to also show the age_to_age off the transformed triangle following this example.
ethan also has an outstanding PR that he's been working on. you'll likely have some merge conflicts.
There was a problem hiding this comment.
Let me add in the LDFs I think that's a good idea.
@EKtheSage can you respond to the PRs you submitted, I don't think you are working on the development class and my has the newer stuff that was just merged.
There was a problem hiding this comment.
i see the original ata factors, but not the transformed ata factors.
There was a problem hiding this comment.
The Development class currently doesn't return any transformed age-to-age triangle as an attribute, but it actually goes one step further and actually estimate the LDFs and CDFs.
If you think there's value is seeing the transformed age-to-age triangles we will need to implement it, but I'm not sure that should sit in the Development class because Development() is an LDF/CDF estimator. We could probably do the weights or something? This is because we want follow SKLearn's implementation where model and data are supposed to be separated.
If we want the .fit() to return another attribute called weights we can make another ticket and I can try to work on that.
There was a problem hiding this comment.
this example is for the Development class itself? so a transformed triangle should be within scope.
my original point was just that showing the ldf_ doesn't intuitively demonstrate what the drop parameter is doing. but showing the transformed link ratios does.
There was a problem hiding this comment.
That's my point. The current implantation doesn't show the transformed triangle.
Maybe I'm not following you. What code do you want to show in the docstring?
There was a problem hiding this comment.
something like cl.Development().fit_transform(tri).link_ratio. basically this.
Summary of Changes
Improved doctoring documentation, added a section on the order of drop operations, and added some examples
Related GitHub Issue(s)
#704
Additional Context for Reviewers
N/A
uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)Note
Low Risk
Documentation-only changes to
Development(docstring text and doctest-style examples) with no runtime behavior modifications.Overview
Improves the
Developmentclass docstring by clarifyingaverage/drop-related parameter descriptions and explicitly documenting the order of operations when multiple drop options are combined (including howpreserveaffects exclusions).Adds doctest-style examples demonstrating link ratio inspection and several common pattern-selection workflows (
dropby cell,drop_abovethresholds, combineddrop_above/drop_belowwithpreserve, and comparingaveragemethods).Reviewed by Cursor Bugbot for commit 2763b68. Bugbot is set up for automated code reviews on this repo. Configure here.