Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, n_clusters=8, max_iter=100, num_dissim=euclidean_dissim,
cat_dissim=matching_dissim, init='Huang', n_init=10, gamma=None,
verbose=0, random_state=None, n_jobs=1):
super(KPrototypes, self).__init__(n_clusters, max_iter, cat_dissim, init,
verbose=verbose, random_state=random_state,
n_jobs=n_jobs)
self.num_dissim = num_dissim
self.gamma = gamma
self.n_init = n_init
if isinstance(self.init, list) and self.n_init > 1:
if self.verbose:
print("Initialization method is deterministic. "
"Setting n_init to 1.")
self.n_init = 1