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: