0bed328fc01823df9a99af2b96441398fd35c938,sksurv/metrics.py,,_get_comparable,#Any#Any#Any#,125
Before Change
if j - i > 1:
// event times are tied, need to check for coinciding events
event_at_same_time = event_indicator[order[inext:j]]
mask[inext:j] = numpy.logical_not(event_at_same_time)
tied_time += event_at_same_time.sum()
comparable[i] = mask
elif j - i > 1:
// events at same time are comparable if at least one of them is positive
After Change
event_at_same_time = event_indicator[order[i:end]]
censored_at_same_time = ~event_at_same_time
for j in range(i, end):
if event_indicator[order[j]]:
mask = numpy.zeros(n_samples, dtype=bool)
mask[end:] = True
// an event is comparable to censored samples at same time point
mask[i:end] = censored_at_same_time
comparable[j] = mask
tied_time += censored_at_same_time.sum()
i = end
return comparable, tied_time
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: sebp/scikit-survival
Commit Name: 0bed328fc01823df9a99af2b96441398fd35c938
Time: 2019-04-15
Author: sebp@k-d-w.org
File Name: sksurv/metrics.py
Class Name:
Method Name: _get_comparable
Project Name: CellProfiler/CellProfiler
Commit Name: aadd7d651389f213aaf33b08ab6f533a3ecc59db
Time: 2011-08-04
Author: leek@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/modules/correctilluminationcalculate.py
Class Name: CorrectIlluminationCalculate
Method Name: preprocess_image_for_averaging
Project Name: biolab/orange3
Commit Name: ac892eddd865681c9746efeda9f1f094f26cc32f
Time: 2012-11-29
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/data/filter.py
Class Name: Filter_IsDefined
Method Name: __call__