b46c893e2c0f9cd505b597c2ff215a0df04b6050,lifelines/fitters/npmle.py,,log_likelihood,#,171
Before Change
ll = 0
for observation_interval, w in zip(observation_intervals, weights):
min_, max_ = turnbull_interval_lookup[observation_interval]
ll += w * np.log(p[min_ : max_ + 1].sum())
return ll
After Change
def log_likelihood(p, turnbull_interval_lookup, weights):
P = cumulative_sum(p)
ix = np.array(list(turnbull_interval_lookup.values()))
return (weights * np.log(P[ix[:, 1] + 1] - P[ix[:, 0]])).sum()
def reconstruct_survival_function(probabilities, turnbull_intervals, timeline=None, label="NPMLE"):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: CamDavidsonPilon/lifelines
Commit Name: b46c893e2c0f9cd505b597c2ff215a0df04b6050
Time: 2020-05-19
Author: cam.davidson.pilon@gmail.com
File Name: lifelines/fitters/npmle.py
Class Name:
Method Name: log_likelihood
Project Name: Coder-Yu/RecQ
Commit Name: eb9b33646872a2565dae65b17e9cb908e886386a
Time: 2016-11-12
Author: 156698920@qq.com
File Name: algorithm/rating/SlopeOne.py
Class Name: SlopeOne
Method Name: predict
Project Name: sepandhaghighi/pycm
Commit Name: 1713fe8e0623e7ac8f35ca74d1c0a362c9016708
Time: 2020-05-18
Author: sepand.haghighi@yahoo.com
File Name: pycm/pycm_overall_func.py
Class Name:
Method Name: weighted_alpha_calc