Telegram Web Link
x=[1,0.9;1,0.8;0,0.7;1,0.6;1,0.55;1,0.54;0,0.53;0,0.52;1,0.51;0,0.505;1,0.4;0,0.39;1,0.38;0,0.37;0,0.36;0,0.35;1,0.34;0,0.33;1,0.30;0,0.10]
roc=zeros(size(x))
positive=sum(x(:,1)==1)
negative=sum(x(:,1)==0)
true_positive=0
false_positive=0
for i=1:rows(x)
if x(i,1)==0
false_positive++;
else
true_positive++;
endif
printf("true positive: %d,false positive: %d\n",true_positive,false_positive);
roc(i,1)=false_positive/negative;
roc(i,2)=true_positive/positive;
endfor
plot(roc(:,1),roc(:,2),'k');
print -dpng /tmpfs/roc-curve.png;
close;
ds=0;
for i=2:rows(roc)
ds+=(roc(i,2)+roc(i-1,2))*(roc(i,1)-roc(i-1,1))./2
endfor
ds

#人工智能
zypper search --provides --match-exact file

#信息技术基础
2024/12/23 00:47:39
Back to Top
HTML Embed Code: