fdf356a91622033dc8e88ccf64c2f421e9d3a8a8,pycox/cox.py,CoxTime,predict_cumulative_hazard_at_times,#CoxTime#,833

Before Change


        return np.exp(-self.predict_cumulative_hazard(df, baseline_hazard_, batch_size, verbose))

    def predict_cumulative_hazard_at_times(self, times, df, batch_size=512, return_df=True):
        raise NotImplementedError("This isn"t as relevant when we have broken the propotionality.")

    def concordance_index(self, df, g_preds=None, batch_size=256):
        raise NotImplementedError()

After Change


        """
        assert hasattr(self, "baseline_hazard_"), "Need to fit model first."
        if not hasattr(times, "__iter__"):
            times = [times]
        cum_haz = self.predict_cumulative_hazard(df, baseline_hazard_, batch_size, verbose)
        times_idx = search_sorted_idx(cum_haz.index.values, times)
        cum_haz = cum_haz.iloc[times_idx]
        if return_df:
            return cum_haz
        return cum_haz.as_matrix()

    def predict_survival_at_times(self, times, df, baseline_hazard_=None, batch_size=512,
                                 return_df=True, verbose=0):
        """Predict survival function at given times.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: havakv/pycox
Commit Name: fdf356a91622033dc8e88ccf64c2f421e9d3a8a8
Time: 2018-02-27
Author: kvamme@samba8.ad.nr.no
File Name: pycox/cox.py
Class Name: CoxTime
Method Name: predict_cumulative_hazard_at_times


Project Name: quantumlib/Cirq
Commit Name: 451b2f16acd7dcc8a38cddeff9383143184906fc
Time: 2021-02-08
Author: smitsanghavi@users.noreply.github.com
File Name: cirq/circuits/circuit_operation.py
Class Name: CircuitOperation
Method Name: repeat


Project Name: SPFlow/SPFlow
Commit Name: a94dbd2936fdc64e921333c04e0d66d491efc706
Time: 2018-11-19
Author: claas@voelcker.net
File Name: src/spn/algorithms/stats/Moments.py
Class Name:
Method Name: Moment