Hot answers tagged

4

If you want to test whether your algorithm works as expected, I'd use sklearn datasets. They allow you to create simple synthetic 2D data with certain properties: circles, half moons, etc. If you want "real" datasets, here is an interesting resource found after a brief search: https://uni.hi.is/helmut/2019/06/20/datasets-for-dbscan-evaluation/ It seems to ...


2

Each of those selected clustering algorithms can be fit using cosine distances in scikit-learn: from sklearn.cluster import DBSCAN, MeanShift, OPTICS from sklearn.metrics.pairwise import cosine_distances # Define clustering algorithms algorithms = [DBSCAN, MeanShift, OPTICS] # Placeholder for results results = dict.fromkeys((a.__name__ for a in algorithms)...


1

Kaggle has some nice datasets available, including the classic Iris dataset. Take a look and pick one that looks interesting. There are some impactful real-world data sets there, including COVID-19 related data sets. Something on the lighter side might be this scrubbed Iris data set posted not long ago. EDIT: to elaborate on COVID-19, Kaggle has the COVID-...


1

KMeans and DBSCAN are two different types of Clustering techniques. The elbow method you used to get the best cluster count should be used in K-Means only. You used that value i.e. K=4 to assign colors to the scatterplot, while the parameter is not used in DBSCAN fit method. Actually that is not a valid parm for DBSCAN You will have to control "esp"...


1

The meaning of $\epsilon$ is that of the neighbourhood size. The neighbourhood of a point $p$, denoted by $N_{\epsilon}(p)$, is defined as the $N_{\epsilon}(p) = \{q \in D | dist(p,q) \leq \epsilon \}$. Here $D$ is a database of $n$ objects (points) and $q$ a query point. So what you Professor probably wants you to do is to evaluate goodness of clustering ...


1

Clustering in X,Y,Value Clustering in 3d is great. But be careful with feature scaling in this case. Presumably X, Y have the same scales - so unless you want to treat the different directions differently, make sure not not apply any normalization. As that would distort the grid. Your Value column on the order hand, might be on a very different scale from ...


1

First of all K-means is a partitioning algorithm where as DBSCAN is a Density clustering algorithm. K-means tries to find cluster centers that are representative of certain regions of the data. DBSCAN doesn’t require every point be assigned to a cluster and hence doesn’t partition the data, but instead extracts the dense clusters and leaves sparse background ...


Only top voted, non community-wiki answers of a minimum length are eligible