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

📄 askorder.m

📁 基于多元线性回归、偏最小二乘、神经网络、卡尔漫滤波、径向基网络、主成分分析等等的程序。可用于建模和预测。
💻 M
字号:

function [N] = askorder(LAMBDA)

%   [N] = askorder(LAMBDA)
%
% Determine interactively the model order.
% This routine is to be called only by other functions
%
% Input parameters:
%  - LAMBDA: Vector of latent vector weights
% Return parameters:
%  - N: Selected order
%
% Heikki Hyotyniemi Dec.20, 2000


OK = 0;
N = 1;
n = length(LAMBDA);
fig = figure(10);
while OK == 0
   set(fig,'Name','Latent vector selection window');
   clf;
   hold on;
   plot(LAMBDA,'b');
   plot(LAMBDA,'b*');
   axis([1-0.1*n,n+0.1*n,0,max(LAMBDA)+0.1*max(LAMBDA)]);
   xlabel('Latent vector index');
   plot([N,N],[0,max(LAMBDA)+0.1*max(LAMBDA)],'r');
   text(N+0.02*n,LAMBDA(N),[num2str(round(1000*sum(LAMBDA(1:N))/(10*sum(LAMBDA)))),'% of maximun']);
   plot(LAMBDA(1:N),'m');
   plot(LAMBDA(1:N),'m*');
   plot(LAMBDA(1:N),'mo');
   title('Change the number of latent vectors using mouse (or press <return> if OK)');
   try
      [x,y] = ginput(1);
      if isempty(x) | x < 0.5 | x > n+0.5
         OK = 1;
      else
         N = round(x);
      end
   catch
      disp(['With ',num2str(N),' latent vectors ',num2str(sum(LAMBDA(1:N))/sum(LAMBDA)),'% of maximum captured']);
      OK = 1;
   end
end

⌨️ 快捷键说明

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