0943bf48d384aa24c5e4129ea42752611fe8eb82,kmodes/kmodes.py,,init_cao,#,55

Before Change


    dens /= npoints

    // Choose initial centroids based on distance and density.
    centroids[0] = X[np.argmax(dens)]
    if n_clusters > 1:
        // For the remaining centroids, choose maximum dens * dissim to the
        // (already assigned) centroid with the lowest dens * dissim.
        for ik in range(1, n_clusters):
            dd = np.empty((ik, npoints))
            for ikk in range(ik):
                dd[ikk] = dissim(X, centroids[ikk]) * dens
            centroids[ik] = X[np.argmax(np.min(dd, axis=0))]

    return centroids

After Change


    dens /= npoints

    // Choose initial centroids based on distance and density.
    centroids[0] = X[np.argmax(dens)]
    if n_clusters > 1:
        // For the remaining centroids, choose maximum dens * dissim to the
        // (already assigned) centroid with the lowest dens * dissim.
        for ik in range(1, n_clusters):
            dd = np.empty((ik, npoints))
            for ikk in range(ik):
                dd[ikk] = dissim(X, centroids[ikk]) * dens
            centroids[ik] = X[np.argmax(np.min(dd, axis=0))]

    return centroids
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 8

Non-data size: 10

Instances


Project Name: nicodv/kmodes
Commit Name: 0943bf48d384aa24c5e4129ea42752611fe8eb82
Time: 2017-06-06
Author: benandow@Benjamins-MacBook-Pro.local
File Name: kmodes/kmodes.py
Class Name:
Method Name: init_cao


Project Name: nicodv/kmodes
Commit Name: 0fcdeb25c642b41f037d6e96d6dbd03ba0173178
Time: 2016-02-26
Author: nico.devos@autogrid.com
File Name: kmodes/kmodes.py
Class Name:
Method Name: init_cao


Project Name: nicodv/kmodes
Commit Name: 3ccf38252017799b08041b9a8dc05384f79b5e5c
Time: 2014-09-12
Author: njdevos@gmail.com
File Name: kmodes.py
Class Name: KModes
Method Name: init_centroids


Project Name: nicodv/kmodes
Commit Name: 776e2d359b50f7ab3e8002cab49d41149b0cc6c5
Time: 2017-06-08
Author: nico.devos@autogrid.com
File Name: kmodes/kmodes.py
Class Name:
Method Name: init_cao


Project Name: keras-team/keras
Commit Name: c658993cf596fbd39cf800873bc457e69cfb0cdb
Time: 2019-06-17
Author: adrianstaniec@gmail.com
File Name: keras/layers/convolutional.py
Class Name: Conv3DTranspose
Method Name: compute_output_shape


Project Name: keras-team/keras
Commit Name: ccecd39dd9281d65bada97f6762f622563227315
Time: 2019-09-11
Author: gnuchoi+github@gmail.com
File Name: keras/layers/convolutional.py
Class Name: Conv3DTranspose
Method Name: compute_output_shape


Project Name: nicodv/kmodes
Commit Name: 2eeb70021e262c6a3c7932ff83d746832cc56c99
Time: 2016-05-10
Author: nico.devos@autogrid.com
File Name: kmodes/kmodes.py
Class Name:
Method Name: init_cao


Project Name: nicodv/kmodes
Commit Name: cbb3f6eb2d6dc60bcb5737b5b0b9c78e73080c6a
Time: 2016-02-26
Author: nico.devos@autogrid.com
File Name: kmodes/kmodes.py
Class Name:
Method Name: init_cao