-
Notifications
You must be signed in to change notification settings - Fork 0
/
prediction_3.m
49 lines (44 loc) · 990 Bytes
/
prediction_3.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
function [Valuee,Valuees]=prediction_3(weights,...
dd_updated,X,Class_all,Experts,clfy)
labelDA =dd_updated; %target prediction
% for i=1:Experts
%
% indee=find(labelDA==i);
% if size(indee,1)~= 0
%
%
% net=weights{i,:};
%
% a00=X(indee,:) ;
% [zz,stdclm] = predict(net,a00) ;
%
% zz=reshape(zz,[],1);
% Valuee(indee,:)= zz;
% Valuees(indee,:)=stdclm;
%
% else
%
% Valuee(indee,:)= 0;
% Valuees(indee,:)= 0;
% end
%
%
% end
% Valuee=double(Valuee);
%
% Valuee=clfy.inverse_transform(Valuee);
%%
parfor jj=1:size(labelDA,1)
label=labelDA(jj,:);
net=weights{label,:};
a00=X(jj,:) ;
[zz,s2] = predict(net,a00) ;
zz=reshape(zz,[],1);
s2=reshape(s2,[],1);
Valuee(jj,:)= double(zz);
Valuees(jj,:)= double(s2);
end
Valuee=clfy.inverse_transform(Valuee);
Valuees=clfy.inverse_transform(Valuees);
Valuees=sqrt(Valuees);
end