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:
            sizes = grabocka_params_to_shapelet_size_dict(n_ts, sz, n_labels,
                                                          self.shapelet_length,
                                                          self.total_lengths)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

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: has2k1/plotnine
Commit Name: 8afc45fa9c6d70f74ce140ef1d1347a33099b8d6
Time: 2016-07-20
Author: has2k1@gmail.com
File Name: ggplotx/positions/position_jitterdodge.py
Class Name: position_jitterdodge
Method Name: setup_params


Project Name: probcomp/bayeslite
Commit Name: 047c1206650c6524075e6509809f9810f91548d4
Time: 2015-08-25
Author: riastradh+probcomp@csail.mit.edu
File Name: src/read_csv.py
Class Name:
Method Name: bayesdb_read_csv