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

📄 exp_psvm.asv

📁 具有图形操作界面的支持向量机多类分类实验系统.全部用Matlab实现,可以实现多种分类识别. 这是本人的毕业设计的附属程序
💻 ASV
字号:
% PSVM Plots decision boundary of binary SVM classifier.
%
% Synopsis:
%  h = psvm(...)
%  psvm(model)
%  psvm(model,options)
%
% Description:
%  This function samples the Support Vector Machiones (SVM) decision 
%  function f(x) in 2D feature space and interpolates isoline 
%  width f(x)=0. The isolines f(x)=+1 and f(x)=-1 are plotted as well. 
%
% Input:
%  model [struct] Model of binary SVM classifier:
%   .Alpha [1 x nsv] Weights of training data.
%   .b [real] Bias of decision function.
%   .sv.X [dim x nsv] Support vectors.
%   .options.ker [string] Kernel function identifier.
%      See 'help kernel' for more info.
%   .options.arg [1 x nargs] Kernel argument(s).
%
% options [struct] Controls apperance:
%  .background [1x1] If 1 then backgroud is colored according to 
%    the value of decision function (default 0).
%  .sv [1x1] If 1 then the support vectors are marked (default 1).
%  .sv_size [1x1] Marker size of the support vectors.
%  .margin [1x1] If 1 then margin is displayed (default 1).
%  .gridx [1x1] Sampling in x-axis (default 25).
%  .gridy [1x1] Sampling in y-axis (default 25).
%  .color [int] Color of decision boundary (default 'k').
%
% Output:
%  h [struct] Handles of used graphical objects.
%
% Example:
%  data = load('riply_trn');  
%  model = smo( data, struct('ker','rbf','arg',1,'C',10) );
%  figure;  ppatterns(data);  
%  psvm( model, struct('background',1) );
%
  data = load('riply_trn');  
  t=cputime;
  model = smo( data, struct('ker','rbf','arg',1,'C',10) );
  TimeCost=cputime-t;
  
  figure;title('')
  ppatterns(data);  
  psvm( model, struct('background',1) );

   hpop3 = uicontrol('Style', 'text',...
       'String','时间耗费', 'Position', [300 -20 100 50], 'FontSize',16);
  hpop4 = uicontrol('Style', 'text',...
       'String', TimeCost, 'Position', [400 -20 100 50], 'FontSize',16);









⌨️ 快捷键说明

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