I am building a forecast model using AalenAdditiveFitter from Lifelines in Python to predict whether an event will occur or not and when.
T (time) = months C (event) = 1 is yes and 0 is no
In addition I have 8 attributes that I am using.
aaf = AalenAdditiveFitter(coef_penalizer=1., fit_intercept=True)
cx1 = aaf.fit(trainX.drop(['index'], axis=1), duration_col='T', event_col='C',show_progress=True)
I am able to build a relatively stable model and get cumulative hazard probabilities using the following method:
stestXsurvived = cx1.predict_cumulative_hazard(stestX.drop(['T','C'], axis=1))
Is there a way of getting conditional/marginal probabilities straight from AalenAdditiveFitter procedure?
So after doing a little more digging, can I assume the following?
- I get cumulative hazard probabilities from Aalen Additive model
- To get them to conditional probabilities for each individual month, I can just take the difference of prior month: P(t) - P(t-1)
This is based on the answer posted on https://quant.stackexchange.com/questions/21816/cumulative-vs-marginal-probability-of-default
Not sure if this solution is so simple, please help.