Matlab集群编码-散点图 [英] Matlab cluster coding - plot scatter graph

查看:93
本文介绍了Matlab集群编码-散点图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一年的每日年度能耗数据集.我想显示该数据集的散点图,将其分散到我希望存在的四个群集中(由于四个季节的不同)

I have a daily annual energy consumption data set for a one year period. I would like to show a scatter graph of this data set separated into the four clusters which I expect exist (due to the differences of the four seasons)

我知道matlab集群函数可以做到这一点,但是我的统计数据非常生疏,我希望获得一些指导,以了解哪种函数最适合使用

I understand that matlab cluster function can do this but my statistics is very rusty and I was hoping to get some guidance into which function is the best to use

谢谢

推荐答案

请考虑以下 hierarchical 应用于Fisher Iris数据集(150个实例,每个点为4)的集群 -维度):

Consider the following example of hierarchical clustering applied to the Fisher Iris dataset (150 instances, each point is 4-dimensional):

%# load dataset
load fisheriris

%# Construct agglomerative clusters
NUM = 3;
D = pdist(meas, 'euclid');
T = linkage(D, 'ward');
IDX = cluster(T, 'maxclust',NUM);

%# visualize the hierarchy of clusters
figure
h = dendrogram(T, 0, 'colorthreshold',mean(T(end-NUM+1:end-NUM+2,3)));
set(h, 'LineWidth',2)
set(gca, 'XTickLabel',[], 'TickLength',[0 0])

%# plot scatter of data colored by clusters
figure
scatter3(meas(:,1),meas(:,2),meas(:,3), 100, IDX, 'filled')
xlabel SL, ylabel SW, zlabel PL

这篇关于Matlab集群编码-散点图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆