聚类分析 | 基于GA遗传算法优化kmeans聚类(Matlab)
目录
效果一览
基本介绍
GA-kmeans聚类算法,通过GA遗传算法优化kmeans聚类,最后通过CHI DBI 轮廓系数对比分析。
程序设计
- 完整源码和数据获取方式私信博主回复基于GA遗传算法优化kmeans聚类(Matlab)。
clike
%% ==========================清空工作区==============================
clc;
clear;
close all;
addpath(genpath(pwd));
%% ============================导入数据=============================
data = xlsread('序列数据.xlsx');
X = data; % 特征序列
%% ============================kmeans聚类===========================
K = 3;
[idx,C] = mykmeans(X,K,[],[],[],'sqEuclidean','sample'); % 'plus'\'sample'
参考资料
[1] https://blog.csdn.net/kjm13182345320/article/details/129215161
[2] https://blog.csdn.net/kjm13182345320/article/details/128105718