Skip to content

extend to quantile_dist, exclude multi-output #458

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

Merged
merged 9 commits into from
Apr 10, 2025

Conversation

dsweber2
Copy link
Contributor

@dsweber2 dsweber2 commented Apr 8, 2025

Change explanations for reviewer

This grew out of addressing Dan's concerns about the way that outcome handling is done in layer_Yeo_Johnson. I opted to default to starts_with(".pred") or whichever columns the user specifies. I dropped support for multiple output columns with different yj_parameters (aheads would be included as different rows rather than columns), and normalize all of them using whichever column corresponds to the output in the recipe's term_info

In addition, I noticed that the inverse yeo_johnson transform wasn't working on quantile_dist objects. So I rewrote it so that it would, and rewrote the forward transform to match the format.

To add a check for that I added vec_arith.quantile_pred.quantile_pred, though there are ways around it that wouldn't be too nasty.

@dsweber2 dsweber2 requested a review from dshemetov April 8, 2025 00:06
@dsweber2 dsweber2 self-assigned this Apr 8, 2025
@dsweber2 dsweber2 requested a review from dajmcdon as a code owner April 8, 2025 00:06
@dsweber2
Copy link
Contributor Author

dsweber2 commented Apr 8, 2025

checks+formatting passed locally, I guess they're not running b/c I'm not targeting dev

Copy link
Contributor

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, thanks for this! I made a few tweaks

  • added and sharpened a few tests after checking code coverage
  • fixed some quantile_pred arithmetic edge cases (note: these were needed for tests where we difference quantile pred objects, but might be handy in general)

@dshemetov dshemetov merged commit 2dd1ae0 into ds/step-yj Apr 10, 2025
@dshemetov dshemetov deleted the step_yj_extension branch April 10, 2025 21:51
dsweber2 added a commit that referenced this pull request Apr 15, 2025
* extend to quantile_dist, exclude multi-output
* Drop by specification and infer from the epi_df
* lint+test: test coverage, handle na lambda case, lint
* fix: quantile_pred arithmetic
* fix: rlang calls

---------

Co-authored-by: Dmitry Shemetov <dshemetov@ucdavis.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants