-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdemo_1_multiview_clustering.m
34 lines (26 loc) · 1.38 KB
/
demo_1_multiview_clustering.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% This is a demo for the JMVFG algorithm, which is proposed in the paper below. %
% %
% Si-Guo Fang, Dong Huang, Chang-Dong Wang, Yong Tang. %
% Joint Multi-view Unsupervised Feature Selection and Graph Learning. %
% IEEE Transactions on Emerging Topics in Computational Intelligence, 2023. %
% %
% The code has been tested in Matlab R2019b on a PC with Windows 10. %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function demo_1_multiview_clustering()
clc;clear;close all;
dataName = 'HW';
load(['data_',dataName,'.mat'],'X','Y');
eta = 1;gamma = 1;beta = 1e-3;
c = length(unique(Y));
tic;
[ranking,SS,~] = JMVFG(X,eta,gamma,beta,c);
toc;
% Use the learned similarity matrix SS to test the clustering task
fprintf('-------------------------------------------------------------\n')
fprintf('Multi-view clustering: \n')
[Label, ~] = SpectralClustering(SS,c);
Metric = NMImax(Label , Y);
fprintf('NMI = %f\n',Metric)