-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
In the paper, the log likelihood is the sum of cancel rates times log probabilities, plus the end survived rate times final survivor likelihood. Should it therefore not be
def log_likelihood(alpha, beta, data, survivors=None):
if alpha <= 0 or beta <= 0:
return -1000
if survivors is None:
survivors = cancel_rates
probabilities = generate_probabilities(alpha, beta, len(data))
final_survivor_likelihood = survivor(probabilities, len(data) - 1)
return sum([s * np.log(probabilities[t]) for t, s in enumerate(data)]) + survivors[-1] * np.log(final_survivor_likelihood)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels