21ef076316edd5c9be9766ad7c408b9488074d07,kmodes.py,KPrototypes,_perform_clustering,#KPrototypes#Any#Any#Any#Any#Any#,258

Before Change


                    if sum(self.membership[oldCluster,:]) == 0:
                        while True:
                            rIndx = np.random.randint(nPoints)
                            if not all(Xnum[rIndx] == self.centroids[0]).any() and \
                               not all(Xcat[rIndx] == self.centroids[1]).any():
                                break
                        self._add_point_to_cluster(Xnum[rIndx], Xcat[rIndx], rIndx, oldCluster)

After Change


                    if sum(self.membership[oldCluster,:]) == 0:
                        while True:
                            rIndx = np.random.randint(nPoints)
                            if not np.all(np.vstack(( \
                                np.all(Xnum[rIndx] == self.centroids[0], axis=1), \
                                np.all(Xcat[rIndx] == self.centroids[1], axis=1))), \
                                axis=0).any():
                                break
                        self._add_point_to_cluster(Xnum[rIndx], Xcat[rIndx], rIndx, oldCluster)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: nicodv/kmodes
Commit Name: 21ef076316edd5c9be9766ad7c408b9488074d07
Time: 2013-08-16
Author: njdevos@gmail.com
File Name: kmodes.py
Class Name: KPrototypes
Method Name: _perform_clustering


Project Name: luispedro/mahotas
Commit Name: 0ab81f30ea90db0b87a310c70cf9c720672de5b7
Time: 2010-08-12
Author: lpc@cmu.edu
File Name: mahotas/thin.py
Class Name:
Method Name: thin


Project Name: nicodv/kmodes
Commit Name: 90d65897916d0caf6ce58c10f098b0c85759dc0d
Time: 2013-08-16
Author: njdevos@gmail.com
File Name: kmodes.py
Class Name: KPrototypes
Method Name: _perform_clustering