190d9b204a1a4798f0723c8d8d37ac5ac950909e,pycox/models/deephit.py,DeepHitSingle,predict_survival_function,#DeepHitSingle#Any#Any#Any#Any#Any#,34

Before Change


    def predict_survival_function(self, input, batch_size=8224, eval_=True, to_cpu=False,
                                  num_workers=0):
        Mighht need to set to_cpu to true if too large dataset.
        cdf = (self.predict(input, batch_size, False, eval_, False, to_cpu, num_workers)
               .softmax(1)
               [:, :-1]
               .cumsum(1)
               .cpu()
               .numpy())
        return 1 - cdf.transpose()


def make_loss_deephit(alpha, sigma):

After Change


    def predict_survival_function(self, input, batch_size=8224, eval_=True, to_cpu=False,
                                  num_workers=0):
        Might need to set to_cpu to true if too large dataset.
        pmf = self.predict_pmf(input, batch_size, eval_, to_cpu, num_workers, False)
        surv = 1 - pmf.cumsum(0)
        if tuplefy(input).type() is np.ndarray:
            surv = surv.cpu().numpy()
        return surv

    def predict_pmf(self, input, batch_size=8224, eval_=True, to_cpu=False, num_workers=0,
                    numpy=None):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: havakv/pycox
Commit Name: 190d9b204a1a4798f0723c8d8d37ac5ac950909e
Time: 2019-05-08
Author: haavard.kvamme@gmail..com
File Name: pycox/models/deephit.py
Class Name: DeepHitSingle
Method Name: predict_survival_function


Project Name: hassony2/kinetics_i3d_pytorch
Commit Name: 1f3da600c20e3376b0bb396bba482b1e90b7883c
Time: 2017-11-24
Author: yana.hasson@inria.fr
File Name: i3nception_tf.py
Class Name:
Method Name:


Project Name: tyarkoni/pliers
Commit Name: 9f53f2e790fba4a4411224e6255748a45099083a
Time: 2021-01-05
Author: rbrrcc@gmail.com
File Name: pliers/extractors/text.py
Class Name: BertSequenceEncodingExtractor
Method Name: _postprocess