c68ec2e70731f601f630eb1816c51d7ee4ef0853,tslearn/clustering.py,KShape,fit,#KShape#Any#Any#Any#,737

Before Change



        X_ = to_time_series_dataset(X)
        self._norms = numpy.linalg.norm(X_, axis=(1, 2))
        X_ = TimeSeriesScalerMeanVariance(mu=0., std=1.).fit_transform(X_)
        assert X_.shape[-1] == 1, "kShape is supposed to work on monomodal data, provided data has dimension %d" % \
                                  X_.shape[-1]
        if initial_guess is not None:
            assert len(initial_guess) == self.n_clusters, "Initial guess index array must contain {}, {} given".format(self.n_clusters, len(initial_guess))

After Change


        assert X_.shape[-1] == 1, "kShape is supposed to work on monomodal data, provided data has dimension %d" % \
                                  X_.shape[-1]
        if initial_centroids is not None:
            assert initial_centroids.shape[-1] == 1, "kShape is supposed to work on monomodal data, provided data has dimension %d" % \
                                      X_.shape[-1]
            assert initial_centroids.shape[0] == self.n_clusters, "Initial guess index array must contain {}, {} given".format(self.n_clusters, initial_centroids.shape[0])

        rs = check_random_state(self.random_state)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: rtavenar/tslearn
Commit Name: c68ec2e70731f601f630eb1816c51d7ee4ef0853
Time: 2018-08-10
Author: guillaume.androz@gmail.com
File Name: tslearn/clustering.py
Class Name: KShape
Method Name: fit


Project Name: glm-tools/pyglmnet
Commit Name: 0ce5a2bed019cd81f88a1c9c4b5eaeff971383e7
Time: 2018-08-27
Author: mainakjas@gmail.com
File Name: tests/test_pyglmnet.py
Class Name:
Method Name: test_glmnet


Project Name: pavlin-policar/openTSNE
Commit Name: b7b42746fa88fffb6593e7de8096efff5d099ea1
Time: 2018-08-22
Author: pavlin.g.p@gmail.com
File Name: fastTSNE/tsne.py
Class Name: TSNEEmbedding
Method Name: __generate_partial_coordinates