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)
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: sao-eht/eat
Commit Name: 433cd5e10c9af9e74f97a2de2abb3142c36bb6a0
Time: 2017-07-04
Author: ckchan@cfa.harvard.edu
File Name: eat/factor.py
Class Name:
Method Name: factor
Project Name: bokeh/bokeh
Commit Name: d065784874671ef36edc22dfdb3e53155f219b39
Time: 2017-03-30
Author: jsignell@gmail.com
File Name: examples/plotting/file/jitter.py
Class Name:
Method Name: