⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plotout.m

📁 这是一个支持向量机的工具
💻 M
字号:
function plotout(S,errs,x,exm,xname,subp,pcolor)

sw=['Result plotting'];
if pcolor c1='r';c2='b';c3='m';c4='g'; c5='y'; c6='k';
else c1='k';c2='k';c3='';c4=''; c5='k'; c6='k';end

if subp==0 figure('name',sw,'numbertitle','off','color','white');
else subplot(2,2,subp);cla; end

ps=size(S,1);
plot(x,S(1,:),'k*',x,S(2,:),'ko'); hold on;
if ps>2 plot(x,S(3,:),'k^',x,S(4,:),'k+'); hold on; end
plot(x,S(1,:),'k-',x,S(2,:),'k-.'); hold on;
if ps>3 plot(x,S(3,:),'k-',x,S(4,:),'k:'); end

T=max(max(S));
xlim([-0.1+min(x) 0.1+max(x)]);
xlabel('Noise Variance','FontSize',11,'FontWeight','demi');
ylabel('Prediction Error','FontSize',11,'FontWeight','demi');
if subp==0 
  if ps<3
    legend('Linear/SVR','GcLearn Linear/SVR',2);
  else
    legend('Linear regression','GcLearn LinearRegress','epsilon-SVR','GcLearn epsilon-SVR',2);
  end
  ylim([0 1.2*T]);
else 
  legend('Linear','GcL-Lin','eps-SVR','GcL-SVR',2);
  ylim([0 1.2*T]);
end
title(['Results for ' xname]);

if errs~=[] & exm>10
 errs=100*errs;
 subplot(2,2,3);cla; 
 plot(x,errs(1,:),'k*',x,errs(2,:),'ko'); hold on;
 plot(x,errs(1,:),'k-.',x,errs(2,:),'k-');
 T=max(errs(2,:));
 xlim([-0.1+min(x) 0.1+max(x)]);
 xlabel('Noise Variance','FontSize',11,'FontWeight','demi');
 ylabel('Model Error (%)','FontSize',11,'FontWeight','demi');
 if subp==0 
   legend('GcLearn Lregression','Linear regression',2);
   ylim([0 1.1*T]);
 else 
   legend('GcLregress','Lregress',2);
   ylim([0 1.2*T]);
 end
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -