DBSCAN(Density-based spatial clustering of applications with noise) : ๋ฐ๋๊ธฐ๋ฐ clustering algorithm
https://machinelearninggeek.com/dbscan-clustering/
DBSCAN Clustering – Machine Learning Geek
Cluster Analysis comprises of many different methods, of which one is the Density-based Clustering Method. DBSCAN stands for Density-Based Spatial Clustering of Applications with Noise. For a given set of data points, the DBSCAN algorithm clusters together
machinelearninggeek.com
core point
|
์ฃผ์ด์ง ๋ฐ๊ฒฝ ๋ด์ minPts ๊ฐ ์ด์์ ํฌ์ธํธ๋ฅผ ๊ฐ์ง ์
|
epsilon
|
๋ฐ๊ฒฝ
|
minPts
|
core point๊ฐ ๋๊ธฐ ์ํด์๋ ๋ฐ๊ฒฝ ๋ด์ (core point ์ธ์) ์ต์ํ minPts ์ด์์ ์ ์ด ์๊ตฌ๋จ
|
๋ฐ๊ฒฝ ์์ ์๋ ์ ์ '์ง์ ์ ๊ทผ ๊ฐ๋ฅํ ์ '
โ
core point A์ ๋ฐ๊ฒฝ ๋ฐ์ ์์ง๋ง ์ด ๋ฐ๊ฒฝ ์์ ๋ค๋ฅธ ์ B๊ฐ core point์ผ ๋ ๊ทธ ๋ฐ๊ฒฝ ์์ ๋ค์ด์ค๋ ์ ์
'๊ฐ์ ์ ๊ทผ ๊ฐ๋ฅํ ์ '
โ
์ง์ ์ ๊ทผ ๊ฐ๋ฅํ ์ & ๊ฐ์ ์ ๊ทผ ๊ฐ๋ฅํ ์ ๋ค์ ํ cluster๋ก ๋ฌถ๋๋ค.
โ
์ด๋ค cluster์๋ ์ํ์ง ๋ชปํ๋ ์ ๋ค์ 'outliers' outliers๋ '-1'๋ก ํ์๋๋ค.
โ
์ ๊ทธ๋ฆผ์์ y๋ x์ ์ํด '์ง์ ์ ๊ทผ ๊ฐ๋ฅํ ์ '
x๋ p์ ์ํด '์ง์ ์ ๊ทผ ๊ฐ๋ฅํ ์ '
๋ฐ๋ผ์ y๋ p์ ์ํด '๊ฐ์ ์ ๊ทผ ๊ฐ๋ฅํ ์ '
์ค์ต๊ณผ์ ์์ ์์ ๊ฐ๋ ์ DBSCAN์ ์ฐ๊ธฐ๋ณด๋ค ์ด๋ฏธ ๊ฐ๊ณต๋ DF/Series๋ฅผ ๋ฐ์ดํฐ๋ก ์ค์ DBSCAN์ด Gower ๋ชจ๋์ ์ฌ์ฉํด์ ๋น์ ์ฌ๋ matrix๋ฅผ ๋ง๋ค๊ณ clusteringํ๋๋ก ํ ๊ฒ์ด๋ค.
โ
DBSCAN์ ํ ๊ฐ์ ๋น์ ์ฌ๋๋ฅผ ์ฃผ๋ฉด ๊ทธ๊ฒ์ ๊ฐ์ง๊ณ clustering์ ํด์ค๋ค.
โ
Gower: ์ฐ์ํ, ๋ฒ์ฃผํ ๋ฐ์ดํฐ๋ฅผ ๋ชจ๋ ๋ค๋ฃฌ๋ค
Gower ์ฌ์ฉํ์ฌ ํ๊ฐ์ ๋น์ ์ฌ๋ ๊ณ์ฐ : create & return ๋น์ ์ฌ๋ matrix
DBSCAN์ ๋น์ ์ฌ๋ matrix ์ ๋ฌ & clustering ์์ฒญ: cluster data
๋๊ธ