-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathParamOneAnalysis.m
executable file
·49 lines (40 loc) · 1.3 KB
/
ParamOneAnalysis.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
%%% Parameter Analysis with one parameter
%% Initial Setting
addAllpath; rng('default');
%% Datasets to use
dataNames={'enron','yeast'};
numCV=10; numTrial=1; % less than 10
%% Select methods to use
%CAUTION: functionNames is for the plot
functionName={'RAkEL+LP'};
method.name={'RAkEL','LP'};
method=SetALLParams(method);
method.base.name='linear_svm';
method.base.param.svmparam='-s 2 -q';
method.base.param.lambda=10;
method.th.type='SCut';
method.th.param=0.5;
% changeMethod
change.name='RAkEL';
change.param ='numk';
change.value=[3 5 7 9];
Result=cell(length(dataNames),1);
for countData=1:length(dataNames)
dataname=dataNames{countData};
Result{countData}=cell(length(change.value),1);
for countParam=1:length(change.value)
[method]=paramChange(method,change,countParam);
[res]=conductExpriments(method,numTrial,numCV,dataname);
Result{countData}{countParam}=res;
end
end
criteria={'top1','auc','exact','hamming','macroF1','microF1'};
fileNames=criteria;
% Visualization of results
for countData=1:length(dataNames)
dataname=dataNames{countData};
for i=1:length(criteria)
criterion=criteria{i};
getFigure(Result{countData},dataname,change,criterion,['Param',dataname,'-',criterion,'.png']);
end
end