1b3de6b301f962db0271fdad1bbb5036880b7fbc,pycox/preprocessing/label_transforms.py,LabTransPCHazard,__init__,#LabTransPCHazard#,128

Before Change


class LabTransPCHazard:
    def __init__(self, cuts, min_=0., dtype=None):
        self._predefined_cuts = False
        if type(cuts) is int:
            cuts = ("equidistant", cuts + 1)
        elif hasattr(cuts, "__iter__"):
            if (type(cuts[0]) is not str):
                self.idu = IdxDiscUnknownC(cuts)
                assert dtype is None, "Need dtype to be None for spesified cuts"
                self.dtype = type(cuts[0])
                self._dtype = self.dtype
                self._predefined_cuts = True
            elif (len(cuts) == 2) and (type(cuts[0]) is str):
                cuts = (cuts[0], cuts[1] + 1)
        self._cuts = cuts
        self.min_ = min_
        self._dtype = dtype

After Change


            self.cuts = cuts
            self.idu = IdxDiscUnknownC(self.cuts)
            assert dtype is None, "Need `dtype` to be `None` for specified cuts"
            self._dtype = type(self.cuts[0])
            self._dtype_init = self._dtype
            self._predefined_cuts = True
        else:
            self._cuts += 1
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: havakv/pycox
Commit Name: 1b3de6b301f962db0271fdad1bbb5036880b7fbc
Time: 2019-10-12
Author: haavard.kvamme@gmail..com
File Name: pycox/preprocessing/label_transforms.py
Class Name: LabTransPCHazard
Method Name: __init__


Project Name: cve-search/cve-search
Commit Name: a791a06510da0ca7dfd3ca3264043d61a1bbfe11
Time: 2015-01-22
Author: pieterjan.moreels@gmail.com
File Name: lib/Config.py
Class Name: Configuration
Method Name: readSetting


Project Name: kundajelab/deeplift
Commit Name: 8df19287c66ec48337010289475dce44d1dc7cdb
Time: 2017-02-20
Author: avanti.shrikumar@gmail.com
File Name: deeplift/blobs/core.py
Class Name: Dense
Method Name: _get_mxts_increments_for_inputs


Project Name: havakv/pycox
Commit Name: 1b3de6b301f962db0271fdad1bbb5036880b7fbc
Time: 2019-10-12
Author: haavard.kvamme@gmail..com
File Name: pycox/preprocessing/label_transforms.py
Class Name: LabTransDiscreteTime
Method Name: __init__