square / pysurvival

Open source package for Survival Analysis modeling
https://www.pysurvival.io/
Apache License 2.0
347 stars 107 forks source link

two different predict_risk implementations #49

Open iamyihwa opened 2 years ago

iamyihwa commented 2 years ago

For others such as predict_survival, predict_hazard, predict_cdf, implementation in models.py are used in Simulations.

However for predict_risk, in Simulations, instead of using the one in models.py , it uses the one in simulations.py

The two predict_risk ( models.py, simulations.py ), give quite different result.

The one from models.py being sum over cumulative hazard, whereas the one in simulations.py being a sum over weight values (or more complex forms depending on the choice.)

Wonder why it is the case.