sebp / scikit-survival

Survival analysis built on top of scikit-learn
GNU General Public License v3.0
1.15k stars 216 forks source link

FIX LogrankCriterion does not consider sample_weight #464

Closed sebp closed 5 months ago

sebp commented 5 months ago

Checklist

What does this implement/fix? Explain your changes Incorporate sample weights into the LogrankCriterion that is used to compute the split criteria used in SurvivalTree.

Notably, this affects RandomSurvivalForest and ExtraSurvivalTrees too, because individual trees in the forests are passed sample_weight.

codacy-production[bot] commented 5 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.00% :white_check_mark:
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (bceb53ebb8306f959c70fae2be9d552f33dd3f21) | 3526 | 3495 | 99.12% | | | Head commit (769ea89484e2acbb3a2877f34428f238bd96011e) | 3526 (+0) | 3495 (+0) | 99.12% (**+0.00%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#464) | 0 | 0 | **∅ (not applicable)** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences


:rocket: Don’t miss a bit, follow what’s new on Codacy.

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.15%. Comparing base (bceb53e) to head (769ea89). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #464 +/- ## ======================================= Coverage 98.15% 98.15% ======================================= Files 37 37 Lines 3526 3526 Branches 539 539 ======================================= Hits 3461 3461 Misses 31 31 Partials 34 34 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.