-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathgenerateLIST.m
More file actions
executable file
·62 lines (50 loc) · 2.35 KB
/
Copy pathgenerateLIST.m
File metadata and controls
executable file
·62 lines (50 loc) · 2.35 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
53
54
55
56
57
58
59
60
61
62
function [GROUPpositivelist,GROUPnegativelist,GROUPpone] = generateLIST(itemCand,value,finalitemPONElist)
numberofpositivedata = 1;
numterofnegativedata = 1;
numberofpone = 1;
[rowitemOneSupp, colitemOneSupp] = size(itemCand);
GROUPpositivelist = {'x'};
GROUPnegativelist = {'x'};
GROUPpone = {'x'};
for ite = 1:rowitemOneSupp
numberofnone1 = 0;
numberofnone0 = 0;
numberofx=0;
examitemset = finalitemPONElist{ite,1};
%get the positive list
for onegroup = 1:length(value)
valuePoOrNe = finalitemPONElist{ite,onegroup+1};
if valuePoOrNe == 0 || valuePoOrNe == 'x'
numberofnone1= numberofnone1+1;
end
if valuePoOrNe == 'x'
numberofx =numberofx +1;
end
end
if numberofnone1 == 0
GROUPpositivelist{numberofpositivedata,1} = examitemset;% get only the positive item set (for all group) to generate itemset later on.
numberofpositivedata = numberofpositivedata+1;
end
%get the negative list
for onegroup = 1:length(value)
valuePoOrNe = finalitemPONElist{ite,onegroup+1};
if valuePoOrNe == 1 || valuePoOrNe == 'x'
numberofnone0= numberofnone0+1;
end
if valuePoOrNe == 'x'
numberofx =numberofx +1;
end
end
if numberofnone0 == 0
GROUPnegativelist{numterofnegativedata,1} = examitemset;% get only the positive item set (for all group) to generate itemset later on.
numterofnegativedata = numterofnegativedata+1;
end
if (numberofnone0>0 && numberofnone1>0)
if (numberofx == 0)
GROUPpone{numberofpone,1} = examitemset;
numberofpone = numberofpone+1;
end
end
end
return
end