-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDRLSH_Example.m
More file actions
52 lines (44 loc) · 1.14 KB
/
DRLSH_Example.m
File metadata and controls
52 lines (44 loc) · 1.14 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
clc;
clear all;
close all;
%%
%Reading Data
Data = dlmread('Sample.txt');
%%
% Simple Example
ST = 6;
L = 10;
M = 25;
W = 1;
Selected_Index = DRLSH(Data,M,L,W,ST);
Selected_Data = Data(Selected_Index,:);
figure,
scatter(Data(:,1), Data(:,2), [], Data(:,3), 'filled')
title('Original Datatset')
figure,
scatter(Selected_Data(:,1), Selected_Data(:,2), [], Selected_Data(:,3), 'filled')
title('Selected Dataset')
%%
disp('Calculating Tables 1 and 2 in the paper')
M_Vector = [30 25 20 15 10 05];
ST_Vector =[08 06 04 02];
W = 1;
Size_Vector = [];
for iterations = 1:100
iterations
for i1 = 1:numel(M_Vector)
for ii1 = 1:numel(ST_Vector)
ST = ST_Vector(ii1);
L = 10;
M = M_Vector(i1);
W = 1;
tic
Selected_Index_For_timeDuration = DRLSH(Data,M,L,W,ST);
timeduration (ii1,i1, iterations) = toc;
Size_Vector_Time_Duration(ii1,i1, iterations) = numel(Selected_Index_For_timeDuration);
end
end
end
mean(timeduration,3)
mean(Size_Vector_Time_Duration,3)
round(mean(timeduration,3),3)