肘法需要设置
k=MinPts
,但是当MinPts=1
时你该怎么办?这种情况下肘法还可用吗?如果可以,如何判断k
?
我用
k=1
尝试了肘部方法,结果所有距离都为零。
对于 dbscan 的肘法,您设置 k/minPts,这将帮助您选择一个好的 eps 值。最初的 DBSCAN 论文建议将 minPts 设置为数据的维数加一或更高。所以 MinPts < 3 makes typically not much sense.
这是来自 R 包中 dbscan() 的手册页
dbscan
。但这与任何其他实现类似:
设置 DBSCAN 参数
The parameters ‘minPts’ and ‘eps’ depend on each other and
changing one typically requires changing the other one as well.
The original DBSCAN paper suggests to start by setting ‘minPts’ to
the dimensionality of the data plus one or higher. ‘minPts’
defines the minimum density around a core point (i.e., the minimum
density for non-noise areas). Increase the parameter to suppress
more noise in the data and require more points to form a cluster.
A suitable neighborhood size parameter ‘eps’ given a fixed value
for ‘minPts’ can be found visually by inspecting the
‘kNNdistplot()’ of the data using ‘k = minPts - 1’ (‘minPts’
includes the point itself, while the k-nearest neighbor distance
does not). The k-nearest neighbor distance plot sorts all data
points by their k-nearest neighbor distance. A sudden increase of
the kNN distance (a knee) indicates that the points to the right
are most likely outliers. Choose ‘eps’ for DBSCAN where the knee
is.