You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies for vague issue, I've not much time, I noticed that I got a speedup by converting my cluster centroids to integers. Granted my categories are integers and not strings, but you may be able to use np.unique() to swap out strings for integers.
To test this try generating a large matrix of integer classes (for me this was 70,000 rows by 20 columns with each column having 4 classes i.e. numbers 1 to 4) and running the following:
_labels_cost(X, np.uint8(km.cluster_centroids_))
vs.
_labels_cost(X, km.cluster_centroids_)
The text was updated successfully, but these errors were encountered:
Apologies for vague issue, I've not much time, I noticed that I got a speedup by converting my cluster centroids to integers. Granted my categories are integers and not strings, but you may be able to use np.unique() to swap out strings for integers.
To test this try generating a large matrix of integer classes (for me this was 70,000 rows by 20 columns with each column having 4 classes i.e. numbers 1 to 4) and running the following:
vs.
The text was updated successfully, but these errors were encountered: