def decision_function(self, X):
        """Decision function scores.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)
            Test samples.

        Returns
        -------
        T : array, shape = (n_samples,) or (n_samples, n_classes)
            Decision function scores for each sample for each class in the
            model, where classes are ordered as they are in ``self.classes_``.

        """
        X = check_array(X)

        if self._multi_class == 'ovr':
            X_new = np.empty((X.shape[0], self.classes_.size))
            for i, estimator in enumerate(self._estimators):
                X_new[:, i] = estimator.decision_function(X)
        elif self._multi_class == 'ovo':
            predictions = np.vstack(
                [est.predict(X) for est in self._estimators]).T
            confidences = np.vstack(
                [est.decision_function(X) for est in self._estimators]).T
            X_new = _ovr_decision_function(
                predictions, confidences, len(self.classes_))
        else:
            X_new = self._clf.decision_function(X)

        return X_new
Decision function scores.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)
            Test samples.

        Returns
        -------
        T : array, shape = (n_samples,) or (n_samples, n_classes)
            Decision function scores for each sample for each class in the
            model, where classes are ordered as they are in ``self.classes_``.

        
pyts/classification/learning_shapelets.py