Answers for "find optimal number of clusters sklearn"

0

find optimal number of clusters sklearn

# Import library
from clusteval import clusteval

# Set parameters, as an example dbscan
ce = clusteval(method='dbscan')

# Fit to find optimal number of clusters using dbscan
results= ce.fit(X)

# Make plot of the cluster evaluation
ce.plot()

# Make scatter plot. Note that the first two coordinates are used for plotting.
ce.scatter(X)

# results is a dict with various output statistics. One of them are the labels.
cluster_labels = results['labx']
Posted by: Guest on October-06-2021

Code answers related to "find optimal number of clusters sklearn"

Python Answers by Framework

Browse Popular Code Answers by Language