본문 바로가기

Computer Science/Data Science 86

[Partitioning Clustering Method] K-Medoids K-Medoids 배경 : K-Means의 문제 K-means algorithm은 outlier에 민감하다. Outlier는 extremely large/small value를 갖기 때문에 데이터의 distribution을 왜곡시킨다. K-means는 단순한 mean으로 만들어진 centroid를 seed point로 이용하기 때문에 outlier에 민감하다. K-Medoids K-medoids는 mean을 통해 만들어진 virtual object(centroid) 대신 데이터의 중심에 존재하는 real object(medoid)를 이용한다. Medoid는 median과 같이 cluster 내의 중심에 위치하는 real-object이기 때문에 outlier에 휘둘리지 않는다. 또한 다른 객체와의 거리가 .. 2022. 6. 6.
[Partitioning Clustering Method] K-Modes K-Modes K-means method의 변형으로 categorical data에 대해서도 적용이 가능하다. Seed point로 mean(centroid) 대신 mode를 이용한다. * mode : 가장 빈번하게 발생하는 데이터 Dissimilarity Object 간의 dissimilairty는 simple matching을 이용하고, cluster 내의 dissimilarity는 각 object와 mode의 dissimilarity의 합으로 정의한다. → object간 dissimilairty = 불일치하는 attribute의 수 방법 가상의 object(mode Q) 생성 : cluster 내에서 가장 빈번하게 발생하는 attribute들을 골라서 가상의 object를 만든다. Mode와의 di.. 2022. 6. 6.
[Partitioning Clustering Method] K-Means K-Means K-means는 partitioning clustering method 중 하나이다. 각 cluster의 대표 object(seed points)로 centroid를 사용한다. Badness function으로 각 object가 속하는 cluster의 centroid까지의 거리의 제곱 합을 이용한다. * $C_m$ : 각 cluster의 centroid 방법 split : 임의로 k개의 subset으로 나눈다. seed point : 나눠진 k개의 subset에서 centroid를 계산한다. 계산된 centroid points가 seed point가 된다. centroid : 해당 cluster에 속하는 모든 point의 평균점 reassign : 모든 object들에 대해 가장 가까운 c.. 2022. 6. 6.
[Cluster Analysis] Partitioning Algorithm Partitioning Algorithm n개의 object를 가지는 database D를 k개의 cluster로 나누는 작업이다. 조합이 무수히 많기 때문에 clustering ↔ evaluate의 과정을 반복한다. Distance의 제곱이 최소가 되는 clustering 결과를 선택한다. Practically 가능한 모든 조합에 대해 거리의 합을 구하면 되기 때문에 개념적으로는 간단하다. 그러나 현실적으로 가능한 경우의 수가 많기 때문에 모든 조합을 고려하여 global optimal을 찾는 것은 불가능하다. 따라서 cluster에 속하는 object와 대표 object까지의 거리를 cluster의 badness로 삼고 모든 cluster의 badness가 최소가 되는 조합을 찾는다. 대표적인 방법 .. 2022. 6. 6.
[Cluster Analysis] Distance between Clusters Distance between Clusters Hierarchical clustering 할 때 cluster의 거리으로 어떤 것을 선택하는지에 따라 결과가 달라진다. single link $dis(K_i, K_j) = min(t_{ip}, t_{jq})$ cluster 간 object pair의 거리 중 가장 가까운 것을 cluster의 거리로 취급한다. complete link $dis(K_i, K_j) = max(t_{ip}, t_{jq})$ cluster 간 object pair의 거리 중 가장 먼 것을 cluster의 거리로 취급한다. average $dis(K_i, K_j) = avg(t_{ip}, t_{jq})$ cluster 간 모든 object pair의 거리의 평균을 cluster의 거.. 2022. 6. 5.