亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? checkvarsparams.m

?? The Source of Genetic Programming developed in Matlab
?? M
字號:
function params=checkvarsparams(start,continuing,params,n);
%CHECKVARSPARAMS    Initializes GPLAB algorithm parameter variables.
%   CHECKVARSPARAMS(START,CONTINUE,PARAMS,POPSIZE) returns a complete
%   set of valid parameter variables for the GPLAB algorithm, after
%   checking for necessary initializations and eventually request
%   some input from the user.
%
%   Input arguments:
%      START - true if no generations have been run yet (boolean)
%      CONTINUE - true if some generations have been run (boolean)
%      PARAMS - the algorithm running parameters (struct)
%      POPSIZE - the number of individuals in the population (integer)
%   Output arguments:
%      PARAMS - the complete running parameter variables (struct)
%
%   See also CHECKVARSSTATE, CHECKVARSDATA, GPLAB
%
%   Copyright (C) 2003-2007 Sara Silva (sara@dei.uc.pt)
%   This file is part of the GPLAB Toolbox

% check parameter variables:

if start 
   if isempty(params)
      params=setparams([],'defaults','params');
      if ~strcmp(params.output,'silent')
   	fprintf('\n- Setting algorithm parameters with default initial values.\n');
      end   	
   else
      if ~strcmp(params.output,'silent')
         fprintf('\n- Using algorithm parameters with previously set values.\n');
      end
   end
   
   % how many individuals to draw per spin:
   % if empty, set it to maximum value, otherwise make sure we have an integer.
   % (if out of memory, set a lower value in availableparams.m)
   if isempty(params.drawperspin)
       params.drawperspin=intmax;
   else
       params.drawperspin=round(params.drawperspin);
   end
   
   % manage initial operator probabilities:
   if isempty(params.initialvarprobs)
      params.initialvarprobs=normalize(ones(1,length(params.operatornames)),1);
   end
   if isempty(params.initialfixedprobs)
      params.initialfixedprobs=normalize(ones(1,length(params.operatornames)),1);
   end
   
   % manage min probability of any operator, so that the user doesn't set it too low:
   realminprob=0.01/length(params.operatornames);
   if params.minprob<realminprob
      params.minprob=realminprob;
      if ~strcmp(params.output,'silent')
         fprintf('\n   (increasing parameter ''minprob'' to %f)\n',params.minprob);
      end
   end
   
   % manage what is considered a small difference in operator probabilities,
   % considering the percentage changed in each adaptation:
   if isempty(params.smalldifference)
      % the maximum change of the operator with minimum probability:
      maxchangeofminimum=params.percentchange*params.minprob/length(params.operatornames);
      % lets adopt it:
      params.smalldifference=maxchangeofminimum;
   end
   
   % manage filters for strict/dynamic depth/size:
   f1={};
   f2={};
   if strcmp(params.depthnodes,'1') % depth
      if params.fixedlevel
         f1={'strictdepth'};
      end
      if strcmp(params.dynamiclevel,'1')
         f2={'dyndepth'};
      elseif strcmp(params.dynamiclevel,'2')
         f2={'heavydyndepth'};
      end
   else % nodes
      if params.fixedlevel
         f1={'strictnodes'};
      end
      if strcmp(params.dynamiclevel,'1')
         f2={'dynnodes'};
      elseif strcmp(params.dynamiclevel,'2')
         f2={'heavydynnodes'};
      end
   end
   params.filters={f1{:},f2{:}};
   
   % set depth/size parameters that are still empty:
   if isempty(params.inicmaxlevel)
      if strcmp(params.depthnodes,'1') %depth
         params.inicmaxlevel=6;
      else %nodes
         params.inicmaxlevel=28;
         % for symbolic regression of the quartic polynomial and parity 3 problems,
         % this is the number of nodes that gives an initial distribution of sizes
         % more alike the distribution obtained with depth 6. 28 is where the difference
         % between both problems, in the 't' value of the Kolmogorov-Smirnov, is minimal.
      end
      if ~strcmp(params.output,'silent')
         fprintf('\n   (setting parameter ''inicmaxlevel'' automatically...)\n');
      end
   end
   if ~strcmp(params.dynamiclevel,'0') && isempty(params.inicdynlevel)
      if strcmp(params.depthnodes,'1') %depth
         params.inicdynlevel=6;
      else %nodes
         params.inicdynlevel=28;
      end
      if ~strcmp(params.output,'silent')
         fprintf('\n   (setting parameter ''inicdynlevel'' automatically...)\n');
      end
   end
   if ~params.fixedlevel && isempty(params.realmaxlevel)
      if strcmp(params.depthnodes,'1') %depth
         params.realmaxlevel=17;
      else %nodes
         params.realmaxlevel=512;
         % this does not need to be higher for simple problems like symbolic regression
         % of the quartic polinimial and parity 3. some numbers were retrieved from the
         % runs with depth, like the average nodes, tree fill rate, and absolute maximum
         % number of nodes, for each depth, in both problems. 512 nodes is more than
         % ever needed on a tree with depth 17, because tree fill rate is very low.
      end
      if ~strcmp(params.output,'silent')
         fprintf('\n   (setting parameter ''realmaxlevel'' automatically...)\n');
      end
   end
   
   % make sure inicdynlevel is correct:
   if params.inicdynlevel<1
      % correct possible error:
      params.inicdynlevel=1;
      if ~strcmp(params.output,'silent')
         fprintf('\n   (increasing parameter ''inicdynlevel'' to %d)\n',params.inicdynlevel);
      end
   end
      
   % make sure realmaxlevel is at least as high as inicdynlevel:
   if params.inicdynlevel>params.realmaxlevel
      params.realmaxlevel=params.inicdynlevel;
      if ~strcmp(params.output,'silent')
         fprintf('\n   (increasing parameter ''realmaxlevel'' to %d)\n',params.realmaxlevel);
      end
   end
      
   % make sure inicmaxlevel is at least as low as inicdynlevel:
   if params.inicdynlevel<params.inicmaxlevel
      params.inicmaxlevel=params.inicdynlevel;
      if ~strcmp(params.output,'silent')
         fprintf('\n   (decreasing parameter ''inicmaxlevel'' to %d)\n',params.inicmaxlevel);
      end
   end
      
   % make sure inicmaxlevel is correct:
   if params.inicmaxlevel<1
      % correct possible error:
      params.inicmaxlevel=1;
      if ~strcmp(params.output,'silent')
         fprintf('\n   (increasing parameter ''inicmaxlevel'' to %d)\n',params.inicmaxlevel);
      end
   end
      
   % manage generation gap:
   if isempty(params.gengap)
      params.gengap=n;
   else
      if params.gengap<=0 % if gengap is negative
         % correct possible error:
         params.gengap=n;
         if ~strcmp(params.output,'silent')
            fprintf('\n   (increasing parameter ''gengap'' to %d)\n',params.gengap);
         end
      end
      if params.gengap>=1 && mod(params.gengap,1)~=0 % if gengap is >=1 and not integer 
         % correct possible error:
         params.gengap=round(params.gengap);
         if ~strcmp(params.output,'silent')
            fprintf('\n   (rounding parameter ''gengap'' to %d)\n',params.gengap);
         end
      end
   end
   
   % manage automatic probability setting variables (Davis 89)
   if strcmp(params.operatorprobstype,'variable') || strcmp(params.initialprobstype,'variable')
      if isempty(params.adaptinterval)
         params.adaptinterval=1;
         % (by default, adapt operator probabilities every generation)
         if ~strcmp(params.output,'silent')
            fprintf('\n   (setting parameter ''adaptinterval'' automatically...)\n');
         end
      end
      if isempty(params.adaptwindowsize)
         params.adaptwindowsize=max([params.numbackgen*params.gengap params.numbackgen*n]);
	     % (by default, adapt window size includes numbackgen generations of individuals
	     %  or numbackgen times the population size, which one is larger)
	     if ~strcmp(params.output,'silent')
	       fprintf('\n   (setting parameter ''adaptwindowsize'' automatically...)\n');
	     end
      end
   end

   % manage tournament size:
   if (strcmp(params.sampling,'tournament') || strcmp(params.sampling,'lexictour') || strcmp(params.sampling,'doubletour'))
      if isempty(params.tournamentsize)
         params.tournamentsize=0.01;
      	 % (by default, the tournament size is 1% of the population size)
      	 % (if tournamentsize were integer, it would mean absolute numbers)
         if ~strcmp(params.output,'silent')
            fprintf('\n   (setting parameter ''tournamentsize'' automatically...)\n');
         end
      end
      if params.tournamentsize<=0
         % correct possible error:
         params.tournamentsize=0.01;
         if ~strcmp(params.output,'silent')
             fprintf('\n   (increasing parameter ''tournamentsize'' to %d)\n',max([round(params.tournamentsize*n) 2]));
         end
      end
      if params.tournamentsize>n
         % correct possible error, tournament size bigger than popsize:
         params.tournamentsize=n;
         if ~strcmp(params.output,'silent')
             fprintf('\n   (decreasing parameter ''tournamentsize'' to %d)\n',params.tournamentsize);
         end
      end
      % (if tournamentsize==1 the selection for reproduction will be random)
      % (if tournamentsize==popsize only the best individual will produce offspring)
   end

end % if start

if continuing
   if ~strcmp(params.output,'silent')
      fprintf('\n- Using algorithm parameters with previously set values.\n');   
   end
end

% manage directory where to save the algorithm files:
if ~strcmp(params.savetofile,'never')
    
    parentdir=strrep(which(mfilename),strcat(mfilename,'.m'),'');
    
    if isempty(params.savedir)
        % ask user the directory name
        dirname=input('\nPlease name the directory to store the algorithm files: ','s');
    else
        % read directory name from params
        dirname=params.savedir;
    end
       
    % if file was not given with path, use parentdir (where this file is)
    
    % if file was given with path, extract path and directory name:
    % (if the only filesep found is the last character, ignore it, there is no path)
    f=findstr(dirname,filesep);
    if ~isempty(f) && (length(f)~=1 || f(1)~=length(dirname)) 
        % mark the position of the last filesep occuring in dirname
        % (if the directory name ends with filesep, mark the previous one)
        lastfilesep=f(end);
        if lastfilesep==length(dirname)
            lastfilesep=f(end-1);
        end
        parentdir=dirname(1:lastfilesep);
        dirname=dirname(lastfilesep+1:end);
    end
    
    % attempt to create the directory:
    status=mkdir(parentdir,dirname);
    switch status
    case 0
        error('CHECKVARSPARAMS: invalid directory name!');
        %case 2
        %error('CHECKVARSPARAMS: directory already exists!');
    end
    dirname=strcat(parentdir,dirname);
    params.savedir=dirname;
end
% manage "keepevalssize"
if isempty(params.keepevalssize)
   params.keepevalssize=n; % keep only popsize most used individuals
end

% remove 'plotdiversity' from list of plots to draw, in case diversity is not calculated:
if isempty(params.calcdiversity)
   f=find(strcmp(params.graphics,'plotdiversity'));
   if ~isempty(f)
      params.graphics={params.graphics{find(~strcmp(params.graphics,'plotdiversity'))}};
      if ~strcmp(params.output,'silent')
         fprintf('\n   Diversity parameter off: diversity plot will not be drawn.\n');
      end
   end
end

if strcmp(params.output,'verbose')
   fprintf('\n');
   params
   fprintf('\n');
end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内偷窥港台综合视频在线播放| 精品欧美一区二区在线观看| 欧美日韩成人一区| 久久精品一区二区三区不卡| 三级在线观看一区二区| 97久久久精品综合88久久| 精品少妇一区二区三区免费观看| 亚洲一区二区av在线| av电影天堂一区二区在线观看| 欧美成人一区二区| 天堂影院一区二区| 欧美亚洲国产bt| 国产精品久久久久久久久免费丝袜| 免费亚洲电影在线| 精品视频在线免费看| 亚洲综合免费观看高清在线观看| 成人av在线一区二区三区| 精品国产乱码久久久久久蜜臀 | 久久久综合精品| 午夜精彩视频在线观看不卡| 99视频一区二区| 亚洲国产高清aⅴ视频| 国产自产视频一区二区三区| 日韩欧美自拍偷拍| 免费看精品久久片| 日韩一区二区在线播放| 天天色综合天天| 91麻豆精品国产91久久久使用方法| 亚洲最新在线观看| 欧美视频自拍偷拍| 午夜精品视频在线观看| 欧美日韩激情一区二区| 视频在线观看国产精品| 欧美一区二区视频在线观看 | 精品三级在线观看| 久88久久88久久久| 日韩欧美亚洲国产另类 | 亚洲一区二区av电影| 欧美中文字幕一区二区三区亚洲| 亚洲一区二区视频在线| 欧美精品色综合| 免费的国产精品| 久久综合九色综合久久久精品综合| 精久久久久久久久久久| 国产色婷婷亚洲99精品小说| 成人深夜福利app| 亚洲精品免费看| 欧美揉bbbbb揉bbbbb| 日本系列欧美系列| 久久九九99视频| 99re66热这里只有精品3直播 | 欧美性生活一区| 午夜欧美在线一二页| 91精选在线观看| 国产一区二区三区免费观看| 欧美激情综合网| 在线中文字幕不卡| 极品少妇xxxx偷拍精品少妇| 国产精品丝袜久久久久久app| 99精品国产99久久久久久白柏 | 久久国产精品72免费观看| 亚洲一区电影777| 欧美一区二视频| 国产美女视频91| 亚洲美女偷拍久久| 日韩欧美国产精品| fc2成人免费人成在线观看播放 | 国产精品久久久爽爽爽麻豆色哟哟| 一本大道久久精品懂色aⅴ | 这里只有精品99re| 成人aaaa免费全部观看| 日韩av在线发布| 一区在线观看视频| 精品少妇一区二区三区在线播放| 成人av在线看| 久久精品国产亚洲一区二区三区| 欧美国产日韩在线观看| 欧美丰满嫩嫩电影| 91视频一区二区| 黄色日韩三级电影| 亚洲一二三专区| 国产精品成人午夜| 日韩美一区二区三区| 欧美视频一区二区在线观看| 成人午夜av影视| 国内精品免费**视频| 日韩在线一二三区| 亚洲自拍偷拍麻豆| 国产精品视频一二三区| 精品国产亚洲一区二区三区在线观看| 欧美自拍偷拍一区| 91在线观看视频| 国产精品影视在线| 久久99九九99精品| 天天综合天天做天天综合| 亚洲欧美一区二区三区久本道91 | 欧美三级电影网站| 91社区在线播放| 国产精品99久久久久久宅男| 裸体歌舞表演一区二区| 天天影视网天天综合色在线播放| 亚洲精品中文在线| 亚洲天天做日日做天天谢日日欢 | 国产一区二区三区视频在线播放| 视频一区二区不卡| 视频一区中文字幕国产| 亚洲国产精品嫩草影院| 亚洲一区在线播放| 亚洲综合色视频| 亚洲高清一区二区三区| 一区二区三区在线免费| 亚洲女性喷水在线观看一区| 国产精品嫩草久久久久| 国产婷婷色一区二区三区四区 | 亚洲欧美色图小说| 成人欧美一区二区三区1314| 亚洲国产成人在线| 国产精品久久777777| 中文字幕一区二区三区乱码在线| 国产免费成人在线视频| 国产精品成人免费在线| 国产精品每日更新| 亚洲美女在线国产| 亚洲成人黄色影院| 看片网站欧美日韩| 国产成人精品亚洲日本在线桃色| 国产成a人亚洲| youjizz国产精品| 欧美在线制服丝袜| 日韩一区二区三区高清免费看看| 欧美电视剧免费观看| 久久久高清一区二区三区| 亚洲国产精品成人综合 | 91福利视频在线| 欧美电影一区二区| 久久久久久久久久美女| 中文欧美字幕免费| 亚洲在线视频免费观看| 男人的天堂久久精品| 国产精品正在播放| 91黄色在线观看| 精品国产凹凸成av人网站| 中文字幕第一区| 香港成人在线视频| 精品一区二区三区久久| 99久久亚洲一区二区三区青草| 欧美性一区二区| 337p粉嫩大胆噜噜噜噜噜91av | 日本中文字幕一区| 风流少妇一区二区| 欧美日韩国产综合视频在线观看| 日韩欧美的一区| 综合精品久久久| 蜜臀久久99精品久久久久久9| 成人激情小说网站| 欧美高清视频一二三区 | 有码一区二区三区| 蜜臀91精品一区二区三区| 波多野洁衣一区| 日韩免费看的电影| 亚洲色图.com| 国产精品自产自拍| 欧美乱妇15p| 最新国产成人在线观看| 蜜桃久久精品一区二区| 92精品国产成人观看免费| 精品福利二区三区| 亚洲成年人网站在线观看| eeuss鲁片一区二区三区在线看| 欧美一级高清片在线观看| 亚洲免费资源在线播放| 国产一区二区三区在线观看免费视频| 欧美性猛交xxxxxx富婆| 国产精品美女www爽爽爽| 久久激情五月激情| 欧美乱妇20p| 亚洲在线视频免费观看| 成人av免费在线| 国产日韩精品久久久| 久久激情五月激情| 日韩一区二区精品| 亚洲va韩国va欧美va精品| 91视频com| 亚洲视频电影在线| 成人精品电影在线观看| 国产欧美日韩激情| 国产成人自拍在线| 久久综合久久鬼色中文字| 久久国产生活片100| 欧美一级国产精品| 蜜桃视频一区二区| 日韩一区二区精品在线观看| 日韩电影在线观看网站| 欧美日本在线视频| 亚洲国产日日夜夜| 欧美日韩高清一区二区| 日本亚洲电影天堂| 日韩免费看网站| 国产一区视频导航| 久久久不卡影院|