The K-means algorithm is based on the use of squared Euclidean distance as the measure of  dissimilarity between a data point and a prototype vector. Our goal is to partition the data set into some number K of clusters, where we shall suppose for the moment that the value of K is given. We can then define an objective function, sometimes called a distortion measure, given by J=ΣnΣkrnk||xnk||2,where n=1,...N, k=1,...,K, N is observations of a random D-dimensional Euclidean variable x, K is number of clusters. J represents the sum of the squares of the distances of each data point to its assigned vector μk. We can think of the μk as representing the centres of the clusters. Our goal is to find values for the {rnk} and the {μk} so as to minimize J. First we choose some initial values for the μk. Then in the first phase we minimize J with respect to the rnk, keeping the μk fixed. In the second phase we minimize J with respect to μk, keeping rnk fixed. This two-stage optimization is then repeated until convergence. We simply assign the nth data point to the closest cluster centre, this can be expressed as rnk=1,if k=argminj||xnj||2, otherwise rnk=0. The objective function J is a quadratic function of μk, and it can be minimized by setting its derivative with respect to μk to zero giving 2Σnrnk(xnk)=0. μk=(Σnrnkxn)/(Σnrnk), this result has a simple  interpretation, namely set μk equal to the mean of all of the data points xn assigned to cluster k. For this reason, the procedure is known as the K-means algorithm.

K-means algorithm----PRML读书笔记的更多相关文章

  1. expectation-maximization algorithm ---- PRML读书笔记

    An elegant and powerful method for finding maximum likelihood solutions for models with latent varia ...

  2. PRML读书笔记——2 Probability Distributions

    2.1. Binary Variables 1. Bernoulli distribution, p(x = 1|µ) = µ 2.Binomial distribution + 3.beta dis ...

  3. PRML读书笔记——机器学习导论

    什么是模式识别(Pattern Recognition)? 按照Bishop的定义,模式识别就是用机器学习的算法从数据中挖掘出有用的pattern. 人们很早就开始学习如何从大量的数据中发现隐藏在背后 ...

  4. PRML读书笔记——3 Linear Models for Regression

    Linear Basis Function Models 线性模型的一个关键属性是它是参数的一个线性函数,形式如下: w是参数,x可以是原始的数据,也可以是关于原始数据的一个函数值,这个函数就叫bas ...

  5. PRML读书笔记——Mathematical notation

    x, a vector, and all vectors are assumed to be column vectors. M, denote matrices. xT, a row vcetor, ...

  6. 【PRML读书笔记-Chapter1-Introduction】1.5 Decision Theory

    初体验: 概率论为我们提供了一个衡量和控制不确定性的统一的框架,也就是说计算出了一大堆的概率.那么,如何根据这些计算出的概率得到较好的结果,就是决策论要做的事情. 一个例子: 文中举了一个例子: 给定 ...

  7. PRML读书笔记——Introduction

    1.1. Example: Polynomial Curve Fitting 1. Movitate a number of concepts: (1) linear models: Function ...

  8. 【PRML读书笔记-Chapter1-Introduction】1.6 Information Theory

    熵 给定一个离散变量,我们观察它的每一个取值所包含的信息量的大小,因此,我们用来表示信息量的大小,概率分布为.当p(x)=1时,说明这个事件一定会发生,因此,它带给我的信息为0.(因为一定会发生,毫无 ...

  9. 【PRML读书笔记-Chapter1-Introduction】1.4 The Curse of Dimensionality

    维数灾难 给定如下分类问题: 其中x6和x7表示横轴和竖轴(即两个measurements),怎么分? 方法一(simple): 把整个图分成:16个格,当给定一个新的点的时候,就数他所在的格子中,哪 ...

  10. 【PRML读书笔记-Chapter1-Introduction】1.3 Model Selection

    在训练集上有个好的效果不见得在测试集中效果就好,因为可能存在过拟合(over-fitting)的问题. 如果训练集的数据质量很好,那我们只需对这些有效数据训练处一堆模型,或者对一个模型给定系列的参数值 ...

随机推荐

  1. jQuery——jQuery选择器

    基本选择器 # Id选择器 $(“#btnShow”)选择id为btnShow的一个元素 . 类选择器 $(“.liItem”)选择含有类liItem的所有元素 ele 标签选择器 $(“li”)选择 ...

  2. 解决springmvc返回json中文乱码

    在pringmvc中通过设置@ResponseBody返回json乱码问题,这个问题上网找了很久,发现答案真是人云亦云,奉上我的解决方案: 解决方案一:需要导入 jackson-core-asl-1. ...

  3. Ubuntu 关闭guest用户

    Ubuntu 关闭guest用户 ca0gu0@ub:~$ cat /etc/lightdm/lightdm.conf [SeatDefaults]autologin-user=falseallow- ...

  4. shell脚本网络流量实时查看

    Linux网络流量实时查看脚本,Centos默认没有自带流量查看工具,通过网上的资料做了一些修改 #!/bin/bash # Author: Ca0gu0 # Script Name: idev.sh ...

  5. C# 计算百分比

    //计算比率 decimal A =(decimal) 200.20; decimal B = (decimal)1000.20; decimal t = decimal.Parse((A/B).To ...

  6. VBA/VBScript提取Word(*.doc)文件中包含的图片(照片)

    VBA/VBScript提取Word(*.doc)文件中包含的图片(照片)   要处理的人事简历表是典型的Word文档,其中一人一份doc,里面包含有个人的照片,如果要把里面的照片复制出来就比较麻烦了 ...

  7. Java中接口与接口和类之间的关系

    接口和接口之间的关系 继承关系 可以多继承,并且可以多层继承 注意: 1.如果多个父接口中有同名的抽象方法,那么子接口只需要实现一次即可 2.如果多个父接口中有同名的默认方法,那么子接口必须重写默认方 ...

  8. Eclipse 使用前的配置

    一,修改eclipse对jdk的依赖项 1.查看设置的编译器编译版本:设置成本地jdk一致的版本 点击窗口->首选项 找到java 选择编辑器,查看现在的编译jdk版本 改成本地jdk版本 jd ...

  9. colgroup 整行变色

    <table border="2" width="100%"> <colgroup span="2" align=&quo ...

  10. Silverlight之我见——数据批示(1)

    第一次听到这个概念,你是否有点陌生?MSDN上也没有特意的去说明.不要看到这个名词不太熟悉,其实数据批示,玩过C#的人都会非常熟悉,所谓数据批示,其本质就是特性(Attribute),怎么样,现在有点 ...