6ffdbc8963b6bcaf686af1a9d5b7ddf212dbfc31,tslearn/early_classification.py,NonMyopicEarlyClassification,fit,#NonMyopicEarlyClassification#Any#Any#,74

Before Change



        X = check_dims(X)
        y_classes = np.unique(y)
        self.labels_ = sorted(set(y_classes))
        y_classes_indices = [self.labels_.index(yi) for yi in y_classes]
        y_ = np.copy(y)
        for idx, current_class in enumerate(y_classes):
            y_[y_ == current_class] = y_classes_indices[idx]

        self.cluster_ = TimeSeriesKMeans(n_clusters=self.n_clusters,
                                         random_state=self.random_state)
        if self.base_classifier is not None:

After Change


        X1, X2, c_k1, c_k2, y1, y2 = train_test_split(X, c_k, y, test_size=0.5)

        label_to_ind = {lab: ind for ind, lab in enumerate(label_set)}
        y_ = np.array([label_to_ind.get(lab, self.__n_classes_ + 1)
                       for lab in y])

        vector_of_ones = np.ones((X.shape[0], ))
        self.pyck_ = coo_matrix(
            (vector_of_ones, (y_, c_k)),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: rtavenar/tslearn
Commit Name: 6ffdbc8963b6bcaf686af1a9d5b7ddf212dbfc31
Time: 2020-04-21
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/early_classification.py
Class Name: NonMyopicEarlyClassification
Method Name: fit


Project Name: astroML/astroML
Commit Name: 72cb7a23af6fbe31367cbfcbbe13994455708593
Time: 2019-01-02
Author: bsipocz@gmail.com
File Name: doc/sphinxext/numpy_ext/docscrape.py
Class Name: ClassDoc
Method Name: __init__


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 8c18cecf15a8935d8bf712edcc91ac05daf2176e
Time: 2020-06-16
Author: tmatsuo@google.com
File Name: appengine/standard/noxfile-template.py
Class Name:
Method Name:


Project Name: pantsbuild/pants
Commit Name: a0a4eba7bf111138c9660e35e34e665961d1e720
Time: 2013-11-25
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/tasks/bootstrap_utils.py
Class Name: BootstrapUtils
Method Name: get_jvm_build_tools_classpath