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.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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: J535D165/recordlinkage
Commit Name: f0abbde5a393b8781919a2c33474757c07cfee8f
Time: 2016-01-02
Author: jonathandebruinhome@gmail.com
File Name: recordlinkage/indexing.py
Class Name:
Method Name: _sortedneighbourhood


Project Name: NifTK/NiftyNet
Commit Name: c8b28432a637a780eed96547260722ff3dede57e
Time: 2017-10-04
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/sampler_selective.py
Class Name:
Method Name: create_label_size_map