📄 mcactivelearning.m
字号:
function [Y_compute, Y_prob] = MCActiveLearning(classifier, para, X_train, Y_train, X_test, Y_test, num_class)
% global preprocess;
class_set = GetClassSet(Y_train);
p = str2num(char(ParseParameter(para, {'-Iter'; '-IncSize'}, {'10';'10'})));
Iteration = p(1);
IncrementSize = p(2);
for j = 1: Iteration
[Y_compute, Y_prob] = Classify(classifier, X_train, Y_train, X_test, Y_test, num_class);
% Y_prob = Y_prob - preprocess.SVMSCutThreshold;
[C Index] = sort(abs(Y_prob));
for k = 1:IncrementSize
X_train = [X_train; X_test(Index(k), :)];
Y_train = [Y_train; Y_test(Index(k), :)];
X_test(Index(k), :) = []; % Delete the test examples in testing set
Y_test(Index(k), :) = []; % Delete the test examples in testing set
end;
CalculatePerformance(Y_compute, Y_test, class_set);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -