e067d6e72e53409cd58f3aa88312f0cdf0e41133,tslearn/clustering.py,KShape,_update_centroids,#KShape#Any#,422
Before Change
def _update_centroids(self, X):
for k in range(self.n_clusters):
self.cluster_centers_[k] = numpy.empty((X.shape[1] , X.shape[2])) // TODO: Shape Extraction (Alg. 2 in paper)
def _cross_dists(self, X):
return numpy.empty((X.shape[0], self.n_clusters)) // TODO using Alg. 1
After Change
def _update_centroids(self, X):
for k in range(self.n_clusters):
self.cluster_centers_[k] = self._shape_extraction(X, k)
self.cluster_centers_ = TimeSeriesScalerMeanVariance(mu=0., std=1.).fit_transform(self.cluster_centers_)
def _cross_dists(self, X):
return 1. - cdist_normalized_cc(X, self.cluster_centers_, norms1=numpy.array([-1.]), norms2=numpy.array([-1.]),
self_similarity=False) // TODO: provide norms
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: rtavenar/tslearn
Commit Name: e067d6e72e53409cd58f3aa88312f0cdf0e41133
Time: 2017-06-14
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/clustering.py
Class Name: KShape
Method Name: _update_centroids
Project Name: nilearn/nilearn
Commit Name: 40d22a7f95656e02d9fd08e91f732de7df0a5bed
Time: 2015-11-29
Author: gael.varoquaux@normalesup.org
File Name: examples/connectivity/plot_signal_extraction.py
Class Name:
Method Name:
Project Name: akutuzov/webvectors
Commit Name: f6b5fe4a2e91e10385c6f53b40b6b01a5553ad6f
Time: 2017-12-09
Author: akutuzov72@gmail.com
File Name: plotting.py
Class Name:
Method Name: embed