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

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

?? checkvarsparams.m

?? 遺傳規劃的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-2004 Sara Silva (sara@dei.uc.pt)
%   This file is part of the GPLAB Toolbox
%
%   Modified in August 2004:
%   - now you can indicate the full path for the directory where to save the
%   variables during the run, and this directory will be automatically
%   created as long as it does not exist (this did not always happen);
%   - obsolete function 'fwhich' has been replaced with 'which'.


% 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
   
   % 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;
      fprintf('\n   (increasing parameter ''minprob'' to %f)\n',params.minprob);
   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 strcmp(params.fixedlevel,'1')
         f1={'strictdepth'};
      end
      if strcmp(params.dynamiclevel,'1')
         f2={'dyndepth'};
      elseif strcmp(params.dynamiclevel,'2')
         f2={'heavydyndepth'};
      end
   else % nodes
      if strcmp(params.fixedlevel,'1')
         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
      fprintf('\n   (setting parameter ''inicmaxlevel'' automatically...)\n');
   end
   if ~strcmp(params.dynamiclevel,'0') & isempty(params.inicdynlevel)
      if strcmp(params.depthnodes,'1') %depth
         params.inicdynlevel=6;
      else %nodes
         params.inicdynlevel=28;
      end
      fprintf('\n   (setting parameter ''inicdynlevel'' automatically...)\n');
   end
   if ~strcmp(params.fixedlevel,'0') & 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
      fprintf('\n   (setting parameter ''realmaxlevel'' automatically...)\n');
   end
   
   % make sure inicdynlevel is correct:
   if params.inicdynlevel<1
      % correct possible error:
      params.inicdynlevel=1;
      fprintf('\n   (increasing parameter ''inicdynlevel'' to %d)\n',params.inicdynlevel);
   end
      
   % make sure realmaxlevel is at least as high as inicdynlevel:
   if params.inicdynlevel>params.realmaxlevel
      params.realmaxlevel=params.inicdynlevel;
      fprintf('\n   (increasing parameter ''realmaxlevel'' to %d)\n',params.realmaxlevel);
   end
      
   % make sure inicmaxlevel is at least as low as inicdynlevel:
   if params.inicdynlevel<params.inicmaxlevel
      params.inicmaxlevel=params.inicdynlevel;
      fprintf('\n   (decreasing parameter ''inicmaxlevel'' to %d)\n',params.inicmaxlevel);
   end
      
   % make sure inicmaxlevel is correct:
   if params.inicmaxlevel<1
      % correct possible error:
      params.inicmaxlevel=1;
      fprintf('\n   (increasing parameter ''inicmaxlevel'' to %d)\n',params.inicmaxlevel);
   end
      
   % manage generation gap:
   if isempty(params.gengap)
      params.gengap=n;
   else
      if params.gengap<=0
         % correct possible error:
         params.gengap=n;
         fprintf('\n   (increasing parameter ''gengap'' to %d)\n',params.gengap);
      end
      % if gengap is lower than 1, it represents a proportion of the population:
	   if params.gengap<1
         params.gengap=round(params.gengap*n);
      end
   end
   
   % manage automatic probability setting variables (Davis 89)
	if strcmp(params.operatorprobstype,'variable') | strcmp(params.initialprobstype,'variable')
		if isempty(params.adaptinterval)
      	params.adaptinterval=params.gengap;
      	% (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'))
   	if isempty(params.tournamentsize)
      	params.tournamentsize=0.1;
      	% (by default, the tournament size is 10% 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.1;
         fprintf('\n   (increasing parameter ''tournamentsize'' to %d)\n',max(round(params.tournamentsize*n),2));
      end
      % if tournamentsize is lower than 1, it represents a proportion of the population:
      if params.tournamentsize<1
         params.tournamentsize=max(round(params.tournamentsize*n),2);
         % (2 individuals minimum for the tournament)
      end
      % (if tournamentsize==1 the selection for reproduction will be random)
      % (if tournamentsize==popsize only the best individual will produce offspring)
   end

end

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'))}};
      fprintf('\n   Diversity parameter off: diversity plot will not be drawn.\n');
   end
end

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆精品秘密| 国产精品久久久久久福利一牛影视| 亚洲视频1区2区| 99久久精品国产观看| 亚洲免费观看高清完整版在线观看熊| 99久久精品一区二区| 国产一区二区久久| 国产日韩欧美一区二区三区乱码| 成人性生交大片免费看中文网站| 亚洲视频一二区| 欧美日韩中文字幕一区| 久久成人久久爱| 国产精品久久久久毛片软件| 91精品福利视频| 蜜臀av一区二区| 中文字幕av一区二区三区高| 99国产精品一区| 天堂va蜜桃一区二区三区 | 91免费看`日韩一区二区| 国产精品久久一级| 欧美视频一区在线| 久久99久久精品| 亚洲欧洲日韩综合一区二区| 精品视频1区2区| 激情综合网天天干| 亚洲图片激情小说| 日韩欧美美女一区二区三区| 丁香婷婷综合网| 亚洲成人精品影院| 久久精品免费在线观看| 欧美片在线播放| 久久电影国产免费久久电影 | 亚洲欧美日韩国产另类专区| 欧美一级片在线观看| 成人午夜激情片| 日韩在线卡一卡二| 国产精品久久一级| 精品免费一区二区三区| 91成人免费在线视频| 国产大陆精品国产| 青娱乐精品视频在线| 亚洲婷婷国产精品电影人久久| 91精品国产麻豆国产自产在线 | 日韩欧美亚洲国产精品字幕久久久| 国产麻豆成人精品| 亚洲高清三级视频| 日本一区二区视频在线观看| 欧美一区二区三区系列电影| 色综合久久精品| 国产福利一区在线观看| 免费在线视频一区| 亚洲国产精品麻豆| 亚洲靠逼com| 中文字幕不卡在线| 久久精品综合网| 欧美一级免费观看| 欧美日韩www| 在线观看日产精品| 91亚洲精品一区二区乱码| 国产精品一区二区在线看| 另类小说图片综合网| 丝袜美腿亚洲一区二区图片| 亚洲午夜羞羞片| 亚洲色图一区二区| 中文字幕日韩av资源站| 日本一区二区三级电影在线观看| 精品国产一区二区亚洲人成毛片| 欧美高清激情brazzers| 欧美三级日韩三级国产三级| 国产精品美女久久久久久久久 | 日本亚洲视频在线| 亚洲国产精品久久人人爱蜜臀| 自拍偷拍欧美精品| 亚洲人成在线观看一区二区| 中文字幕在线播放不卡一区| 中文字幕乱码日本亚洲一区二区| 国产欧美一区二区三区鸳鸯浴| 26uuu成人网一区二区三区| 日韩三级视频在线观看| 精品嫩草影院久久| 久久久久国产精品厨房| 欧美激情在线一区二区| 国产欧美一区二区精品性色| 中日韩免费视频中文字幕| 国产精品午夜免费| 一区二区在线观看视频在线观看| 一区二区在线电影| 香蕉久久一区二区不卡无毒影院| 婷婷久久综合九色综合绿巨人| 五月天一区二区| 久久精品久久99精品久久| 国产精品亚洲午夜一区二区三区| 成人免费视频app| 91视频一区二区三区| 精品视频在线看| 欧美电影免费提供在线观看| 久久亚洲综合色| 国产精品久久久久久久久果冻传媒| 日韩毛片高清在线播放| 亚洲国产aⅴ天堂久久| 六月丁香婷婷色狠狠久久| 岛国精品一区二区| 色94色欧美sute亚洲13| 欧美一卡二卡在线| 国产日产精品1区| 亚洲一二三区不卡| 国产剧情一区二区| 99视频精品全部免费在线| 欧洲生活片亚洲生活在线观看| 欧美一二三四区在线| 国产精品久久久久一区二区三区共| 亚洲综合丝袜美腿| 精品中文字幕一区二区| 波多野结衣在线aⅴ中文字幕不卡| 91麻豆成人久久精品二区三区| 欧美精选午夜久久久乱码6080| 久久精品亚洲精品国产欧美| 一区二区三区四区五区视频在线观看| 免费看欧美女人艹b| 波多野结衣精品在线| 欧美一区二区三区在线视频| 欧美韩国日本综合| 奇米在线7777在线精品| 99久久婷婷国产| 日韩免费电影一区| 亚洲色图视频网站| 久久99国产精品久久99| 91国偷自产一区二区三区观看| 精品国产伦一区二区三区观看体验| 最新高清无码专区| 国产精品影视网| 欧美精品九九99久久| 亚洲日本va午夜在线电影| 国产美女一区二区| 91精品一区二区三区久久久久久| 国产精品久久久久一区二区三区 | 色综合久久久久综合体桃花网| 日韩精品最新网址| 亚洲午夜在线电影| 91麻豆产精品久久久久久| 国产日韩av一区| 国产一区二区在线视频| 91精品国产全国免费观看| 伊人开心综合网| 91色porny蝌蚪| 亚洲欧美综合色| 成人午夜伦理影院| 久久夜色精品国产噜噜av| 麻豆91精品91久久久的内涵| 欧美日韩三级一区| 亚洲午夜久久久久久久久电影网 | 日本道色综合久久| 国产精品情趣视频| 国产·精品毛片| 久久久五月婷婷| 国内精品视频666| 精品美女一区二区| 激情久久五月天| 精品久久久久久最新网址| 免费在线看成人av| 欧美一区二区三区电影| 日韩精品免费专区| 欧美一区二区三区不卡| 日本v片在线高清不卡在线观看| 欧美日韩一卡二卡三卡| 日韩国产一区二| 欧美一区二区三区播放老司机| 男人的天堂久久精品| 日韩欧美成人激情| 精品一区二区三区久久| 久久众筹精品私拍模特| 国产馆精品极品| 国产精品视频免费看| 99热国产精品| 亚洲乱码日产精品bd| 欧美性猛交xxxx乱大交退制版| 亚洲妇熟xx妇色黄| 欧美精品18+| 国产一区视频网站| 国产精品视频yy9299一区| 99久久精品99国产精品| 一区二区免费看| 欧美久久一二区| 国产酒店精品激情| 亚洲日本va在线观看| 欧美群妇大交群中文字幕| 毛片基地黄久久久久久天堂| 久久综合色8888| gogo大胆日本视频一区| 亚洲一区二区五区| 91精品一区二区三区久久久久久 | 亚洲乱码日产精品bd| 欧美日韩一区二区三区在线看| 蜜乳av一区二区| 欧美激情一区二区三区在线| 欧美午夜精品理论片a级按摩| 色综合天天做天天爱| 亚洲国产va精品久久久不卡综合| 欧美变态口味重另类| 99九九99九九九视频精品|