85aabb5014e22659ac722280607a1f4b44e1fb32,tslearn/shapelets.py,ShapeletModel,fit,#ShapeletModel#Any#Any#,380

Before Change


        else:
            y_ = y
            self.categorical_y_ = True
            self.classes_ = numpy.unique(y)
            assert y_.shape[1] != 2, ("Binary classification case, " +
                                      "monodimensional y should be passed.")

        if y_.ndim == 1 or y_.shape[1] == 1:

After Change


        self.label_to_ind_ = None
        self.d_ = d

        self.classes_ = [int(lab) for lab in set(y)]
        n_labels = len(self.classes_)
        self.label_to_ind_ = {int(lab): ind
                              for ind, lab in enumerate(self.classes_)}
        y_ind = numpy.array(
            [self.label_to_ind_[lab] for lab in y]
        )
        y_ = to_categorical(y_ind)
        if n_labels == 2:
            y_ = y_[:, 1:]  // Keep only indicator of max index class

        if self.n_shapelets_per_size is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: rtavenar/tslearn
Commit Name: 85aabb5014e22659ac722280607a1f4b44e1fb32
Time: 2020-05-03
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/shapelets.py
Class Name: ShapeletModel
Method Name: fit


Project Name: theislab/scanpy
Commit Name: b5cf5b5a239bfeb3668c9ecb872683e149f7fab8
Time: 2018-05-18
Author: f.alex.wolf@gmx.de
File Name: scanpy/tools/louvain.py
Class Name:
Method Name: louvain


Project Name: etal/cnvkit
Commit Name: 1dba0aaea818505ac4e22cd779995b46454207bb
Time: 2016-08-30
Author: bpederse@gmail.com
File Name: cnvlib/segmentation/__init__.py
Class Name:
Method Name: do_segmentation


Project Name: kwgoodman/numerox
Commit Name: 79c3d3004346ae19bb13332f84771a00a224e788
Time: 2017-10-24
Author: kwgoodman@gmail.com
File Name: numerox/util.py
Class Name:
Method Name: cv