Clustering Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 18: Line 18:
A coherent group in the universe of points are those points that have small [[#Distance|distances]] from each other, so they are "similar". They are considered to be "nearby" to each other, and thus form clusters.
A coherent group in the universe of points are those points that have small [[#Distance|distances]] from each other, so they are "similar". They are considered to be "nearby" to each other, and thus form clusters.
=Objective Function=
=Objective Function=
A way to evaluate how good the clustering is is to define an objective function, and seek out the clustering that optimizes the objective function. This approach is called '''optimization'''. There is more than one objective functions:  
A way to evaluate how good the clustering is is to define an objective function, and seek out the clustering that optimizes the objective function. This approach is called '''optimization'''. There is more than one objective functions, and among the known objective functions there are the K-Means objective function, etc.:  
==K-Means Objective Function==
==K-Means Objective Function==
{{External|https://www.saedsayad.com/clustering_kmeans.htm}}
{{External|https://www.saedsayad.com/clustering_kmeans.htm}}

Revision as of 20:44, 23 October 2021

External

Internal

Overview

We talk about "clustering" when we have a set of n "points", which we may think about as points in space in geometrical sense. It is actually quite rare that the underlying problem we care about is intrinsically geometric. Usually we are representing something else we care about (web pages, genome sequence fragments, etc.) and we want to cluster them in coherent groups. In machine learning, the same problem is referred to as "unsupervised learning", meaning that the data is unlabeled and we are looking for patterns in data, when data is not annotated.

Distance Function

Clustering problems require a similarity measure, which is a function that for any two object returns a numerical result that expresses how similar (or dissimilar) those objects are. We refer to this function as the distance function. The distance function d(p,q) returns the distance between each point pair.

The distance function is symmetric: d(p,q) = d(q,p).

Examples of distance functions: euclidian distance between two points in space, the penalty of the best alignment between two genome fragments, etc.

Coherent Groups

A coherent group in the universe of points are those points that have small distances from each other, so they are "similar". They are considered to be "nearby" to each other, and thus form clusters.

Objective Function

A way to evaluate how good the clustering is is to define an objective function, and seek out the clustering that optimizes the objective function. This approach is called optimization. There is more than one objective functions, and among the known objective functions there are the K-Means objective function, etc.:

K-Means Objective Function

https://www.saedsayad.com/clustering_kmeans.htm

K-Means clustering intends to partition n objects into k clusters in which each object belongs to the cluster with the nearest mean. This method produces exactly k different clusters of greatest possible distinction. The best number of clusters k leading to the greatest separation (distance) is not known a priori and must be computed from the data. The objective of K-Means clustering is to minimize total intra-cluster variance, or, the squared error objective function J:

     k   n 
 J = ∑   ∑ ‖xi(j)-cj2
    j=1 i=1

where:

  • k is the number of clusters
  • n is the number of cases
  • xi(j) is the case i
  • cj is the centroid for cluster j
  • ‖...‖ is the distance function

The Clustering Problem

Organizatorium

  • Some well known clustering algorithms are greedy.