Skip to content
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

[Internals] Few simplifications #34

Merged
merged 8 commits into from
May 10, 2024
Merged

[Internals] Few simplifications #34

merged 8 commits into from
May 10, 2024

Conversation

lrnv
Copy link
Member

@lrnv lrnv commented Apr 30, 2024

Hey I tried to do a bit of simplifications of the fit() code, I hope its more readable like that.

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 1 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (main@647aa41). Click here to learn what that means.

❗ Current head f9f7309 differs from pull request most recent head 7a8367f. Consider uploading reports for the commit 7a8367f to get more accurate results

Files Patch % Lines
src/NPNSEstimator.jl 94.44% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #34   +/-   ##
=======================================
  Coverage        ?   91.34%           
=======================================
  Files           ?        8           
  Lines           ?      208           
  Branches        ?        0           
=======================================
  Hits            ?      190           
  Misses          ?       18           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lrnv
Copy link
Member Author

lrnv commented May 1, 2024

@rimhajal This simplifies the code but also changes the structure of the output of the pohar perme fitting when there are covariates, in particular when there is several covariates.

Maybe you could tell me what you think of the output of :

f1 = fit(PoharPerme, @formula(Surv(time,status)~sex), colrec, frpop)
f2 = fit(PoharPerme, @formula(Surv(time,status)~(sex+stage)), colrec, frpop)

Edit: Wait a bit I'm trying other output formats, I will ping you when i am done

@rimhajal
Copy link
Member

rimhajal commented May 2, 2024

that way people can tell what dataframe refers to which group, this is good!

@rimhajal
Copy link
Member

rimhajal commented May 2, 2024

julia> x.age
0x0000000000000002

julia> x.keys
16-element Vector{@NamedTuple{sex::Symbol, stage::Int64}}:
#undef
#undef
(sex = :male, stage = 1)
(sex = :female, stage = 3)
(sex = :female, stage = 99)
(sex = :male, stage = 99)
#undef
#undef
#undef
(sex = :male, stage = 2)
(sex = :male, stage = 3)
(sex = :female, stage = 1)
#undef
#undef
#undef
(sex = :female, stage = 2)

there are some weird outputs though

@lrnv lrnv marked this pull request as draft May 9, 2024 14:54
@lrnv lrnv force-pushed the simplify_code branch 2 times, most recently from 17e0a49 to 7ad6e61 Compare May 9, 2024 15:40
@lrnv lrnv force-pushed the simplify_code branch from 7ad6e61 to 1453b84 Compare May 9, 2024 15:42
@lrnv
Copy link
Member Author

lrnv commented May 9, 2024

@rimhajal Now the docs are adapted so this should also be good to go.

@lrnv lrnv marked this pull request as ready for review May 9, 2024 16:38
@rimhajal rimhajal merged commit e8b1751 into main May 10, 2024
3 checks passed
@rimhajal rimhajal deleted the simplify_code branch May 10, 2024 06:50
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