homework7_ZhankunLuo

本文是关于聚类分析的作业,主要探讨了硬聚类算法k-means及其缺点,如对初始划分敏感、需要预先知道簇数量等问题。此外,还介绍了模糊C均值(FCM)算法,对比了不同q值对聚类结果的影响,强调选择合适的q值对解决特定聚类问题的重要性。
摘要由CSDN通过智能技术生成

Homework 7

Zhankun Luo

PUID: 0031195279

Email: luo333@pnw.edu

Fall-2018-ECE-59500-009

Instructor: Toma Hentea

Function

plot_cluster.m

function [] = plot_cluster(X2, bel, theta)
plot(X2(1,bel==1),X2(2,bel==1),'r.',...
X2(1,bel==2),X2(2,bel==2),'g*',X2(1,bel==3),X2(2,bel==3),'bo',...
X2(1,bel==4),X2(2,bel==4),'cx',X2(1,bel==5),X2(2,bel==5),'md',...
X2(1,bel==6),X2(2,bel==6),'yp',X2(1,bel==7),X2(2,bel==7),'ks')
hold on, plot(theta(1,:), theta(2,:),'k+')
end

k_means.m

Hard Clustering: k-means

HardClustering
HardClustering2

Where
d ( x i , θ j ( t ) ) = [ x i − θ j ( t ) ] T [ x i − θ j ( t ) ] ∑ i = 1 N u i j ( t − 1 ) ∂ d ( x i , θ j ( t ) ) ∂ θ j = 2 ∑ i = 1 N u i j ( t − 1 ) [ θ j ( t ) − x i ] = 0 d(x_i, \theta_j(t))=[x_i - \theta_j(t)]^T[x_i - \theta_j(t)]\\ \sum_{i=1}^{N} u_{ij}(t-1) \frac{\partial d(x_i, \theta_j(t))}{\partial \theta_j} = 2\sum_{i=1}^{N} u_{ij}(t-1) [\theta_j(t) - x_i] = 0\\ d(xi,θj(t))=[xiθj(t)]T[xiθj(t)]i=1Nuij(t1)θjd(xi,θj(t))=2i=1Nuij(t1)[θ

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值