-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMCILBoost.m
31 lines (30 loc) · 1.04 KB
/
MCILBoost.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
% Jun-Yan Zhu (junyanz at eecs dot berkeley dot edu)
% University of California, Berkeley
% Please kindly cite the following paper if you use our code.
% "Multiple Clustered Instance Learning for Histopathology Cancer Image
% Segmentation, Clustering, and Classification"
% Yan Xu*, Jun-Yan Zhu*, Eric Chang and Zhuowen Tu. (*equal contribution)
% main entry function
function [mean_acc, auc] = MCILBoost(PARAMS)
CLF = PARAMS.CLF;
dataFile = PARAMS.dataFile;
modelFile = PARAMS.modelFile;
resultFile = PARAMS.resultFile;
nFold = PARAMS.nFold;
thres = PARAMS.thres;
isFix = PARAMS.isFix;
mean_acc = 0;
auc = 0;
switch PARAMS.mode
case 'train'
TrainModel(CLF, dataFile, modelFile);
case 'test'
TestModel(CLF, dataFile, modelFile, resultFile);
result = ReadResult(resultFile);
[mean_acc, auc] = MeasureResult(result, thres);
case 'cross-validate'
[mean_acc, auc] = CrossValidate(dataFile, modelFile, CLF, nFold, isFix, thres);
otherwise
disp('wrong mode input');
end
end