-
Notifications
You must be signed in to change notification settings - Fork 2
/
main2.m
26 lines (22 loc) · 1.1 KB
/
main2.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% The code for testing the algorithm LGD on two synthetic datasets.
% Written by Ruijia Li (ruijia2017@163.com), Lab of GRC & AI.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear; close all; clc;
addpath(genpath(pwd)); % set path
%% test 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load ThreeDensities; % load dataset
k = 35; tau = 0.57; % set the parameters
c = 0; % set the number of clusters
Figure = 1; % show the figures? 0 or 1
%% test 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% load crossClusters;
% k = 15; tau = 0.27;
% c = 0;
% Figure = 1;
%% run LGD %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If the number of clusters is not entered or set c = 0,
% we need to enter it during the clustering process.
labels = LGD(X,k,tau,Figure,c);