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

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

?? gaplsout.m

?? 將PLS與遺傳算法相結合
?? M
字號:
% Application of GA to the detection of outliers coupled to GA-PLS
%
% by R. Leardi
%
% Dipartimento di Chimica e Tecnologie Farmaceutiche ed Alimentari
% via Brigata Salerno (ponte) - 16147 GENOVA (ITALY)
% e-mail: riclea@dictfa.unige.it
%
% The syntax is: [ressq,counter]=gaplsout(dataset)
% The y variable is the last one
%
% The output matrix ressq reports the squared residuals for each run
% The output vector counter holds the number of runs in which each object has been predicted

function [ressq,counter]=gaplsout(total)
clc
format compact
randomiz
[tob,c]=size(total);
disp(['objects: ' int2str(tob)])
y=total(:,c);
v=c-1;
disp(['variables: ' int2str(v)]);
s1=[];s2=[];b=[];fin=[];ressq=zeros(tob,100);counter=zeros(1,tob);

evaluat=50; % 50 evaluations
objtr=30; % 30 objects in each training set
aut=2; % autoscaling; 0=raw data; 1=column centering
ng=5; % 5 deletion groups
cr=30; % 30 chromosomes
probsel=5/v; % on average 5 variables per chromosome in the orig. pop.
maxvar=30; % 30 variables as a maximum
probmut=0.01; % probability of mutation 1%
probcross=0.5; % probability of cross-over 50%
freqb=100; % backward stepwise every 100 evaluations 
if floor(evaluat/100)==evaluat/100;
  endb='N';
else
  endb='Y';
end
runs=ceil(100/((tob-objtr)/tob)); % the number of runs is computed in such a way that each object is predicted 100 times on average
el=3;

for r=1:runs
  disp(' ')
  disp(['run ' num2str(r)])
  trpr=randperm(tob);
  dataset=total(trpr(1:objtr),:);
  predset=total(trpr(objtr+1:tob),:);
  % computation of CV var. with all the variables
  % (the optimal number of components will be the maximum for GA)
  start=0;
  while start==0
    [maxcomp,start,mxi,sxi,myi,syi]=plsgacv(dataset(:,1:v),y(trpr(1:objtr)),aut,ng,15);
  end
  disp(' ')
  disp(['With all the variables:'])
  disp(['components: ' int2str(maxcomp)])
  disp(['C.V. variance: ' num2str(start)])
  % creation and evaluation of the starting population
  crom=zeros(cr,v);
  resp=zeros(cr,1);
  comp=zeros(cr,1);
  numvar=zeros(cr,1); %%% numvar stores the number of variables in each chr.
  lib=[]; %%% lib is the matrix with all the already tested chromosomes %%%
  libb=[];%%% libb is the matrix with all the already backw. chromosomes %%%
  nextb=freqb;
  cc=0;
  while cc<cr
    den=0;
    sumvar=0;
    while (sumvar==0 | sumvar>maxvar)
      a=rand(1,v);
      for j=1:v
        if a(1,j)<probsel
          a(1,j)=1;
        else
          a(1,j)=0;
        end    
      end
      sumvar=sum(a);
    end
    den=checktw(cc,lib,a);
    if den==0
      lib=[lib;a];
      if cc>0
        [s1,s2]=chksubs(cc,crom(1:cc,:),a);
      end
      cc=cc+1;  
      var=find(a);
      [fac,risp]=plsgacv(dataset(:,var),y(trpr(1:objtr)),aut,ng,maxcomp,mxi(:,var),sxi(:,var),myi,syi);
      if isempty(s2)
        mm=0;
      else
        mm=max(resp(s2));
      end
      if risp>mm  % the new chrom. survives only if better
        crom(cc,:)=a;
        resp(cc,1)=risp;
        comp(cc,1)=fac;
        numvar(cc,1)=size(var,2);
        for kk=1:size(s1,2)
          if risp>=resp(s1(kk))
            resp(s1(kk))=0; % the old chrom. are killed if worse
          end
        end
      end
    end
  end

  [vv,pp]=sort(resp);
  pp=flipud(pp);
  crom=crom(pp,:);
  resp=resp(pp,:);
  comp=comp(pp,:);
  numvar=numvar(pp,:);

  disp(' ')
  disp(['After the creation of the original population: ' num2str(resp(1))])
  maxrisp=resp(1);

  while cc<evaluat
    % selection of 2 chromosomes
    cumrisp=cumsum(resp);
    if resp(2)==0
      rr=randperm(cr);
      p(1,:)=crom(rr(1),:);
      if resp(1)==0
        p(2,:)=crom(rr(2),:);
      else
        p(1,:)=crom(1,:);
      end
    else
      k=rand*cumrisp(cr);
      j=1;
      while k>cumrisp(j)
        j=j+1;
      end
      p(1,:)=crom(j,:);
      p(2,:)=p(1,:);
      while p(2,:)==p(1,:)
        k=rand*cumrisp(cr);
        j=1;
        while k>cumrisp(j)
          j=j+1;
        end
        p(2,:)=crom(j,:);
      end
    end

    % cross-over between the 2 chromosomes
    s=p;
    diff=find(p(1,:)~=p(2,:));
    randmat=rand(1,size(diff,2));
    cro=find(randmat<probcross);
    s(1,diff(cro))=p(2,diff(cro));
    s(2,diff(cro))=p(1,diff(cro));

    % mutations
    m=rand(2,v);
    for i=1:2
      f=find((m(i,:))<probmut);
      bb=size(f,2);
      for j=1:bb
        if s(i,f(j))==0
          s(i,f(j))=1;
        else
          s(i,f(j))=0;
        end
      end
    end
 
    % evaluation of the offspring
    for i=1:2
      den=0;
      var=find(s(i,:));
      sumvar=sum(s(i,:));
      if sumvar==0 | sumvar>maxvar
        den=1;
      end
      if den==0
        den=checktw(cc,lib,s(i,:));
      end
      if den==0
        cc=cc+1;  
	[fac,risp]=plsgacv(dataset(:,var),y(trpr(1:objtr)),aut,ng,maxcomp,mxi(:,var),sxi(:,var),myi,syi);
        lib=[s(i,:);lib];
        if risp>maxrisp
          disp(['ev. ' int2str(cc) ' - ' num2str(risp)])
          maxrisp=risp;
        end
        if risp>resp(cr)
          [crom,resp,comp,numvar]=update(cr,crom,s(i,:),resp,comp,numvar,risp,fac,var);
        end
      end
    end

    % stepwise
    if cc>=nextb
      nextb=nextb+freqb;
      [nc,rispmax,compmax,cc,maxrisp,libb]=backw(r,cr,crom,resp,numvar,cc,dataset,y(trpr(1:objtr)),aut,ng,maxcomp,maxrisp,libb,mxi,sxi,myi,syi,el);
      if isempty(nc)~=1
	[crom,resp,comp,numvar]=update(cr,crom,nc,resp,comp,numvar,rispmax,compmax,find(nc));
      end
    end

  end

  if endb=='Y' % final stepwise
    [nc,rispmax,compmax,cc,maxrisp,libb]=backw(r,cr,crom,resp,numvar,cc,dataset,y(trpr(1:objtr)),aut,ng,maxcomp,maxrisp,libb,mxi,sxi,myi,syi,el);
    if isempty(nc)~=1
      [crom,resp,comp,numvar]=update(cr,crom,nc,resp,comp,numvar,rispmax,compmax,find(nc));
    end
  end

  selvar=find(crom(1,:));

  [e]=predpls(dataset(:,selvar),y(trpr(1:objtr)),predset(:,selvar),y(trpr(objtr+1:tob)),comp(1),aut);
%                 disp(trpr)
%                 disp(' ')
%                 disp(selvar)
%                 disp(' ')
%                 disp(e)
  for rescount=1:tob-30
    ressq(trpr(objtr+rescount),r)=(e(rescount)-predset(rescount,c))^2;
    counter(trpr(objtr+rescount))=counter(trpr(objtr+rescount))+1;
  end
  for jj=1:tob
    if counter(jj)>0
      meanressq(jj)=sum(ressq(jj,:))/counter(jj);
    else
      meanressq(jj)=0;
    end
  end
  figure(1)
  bar(sqrt(meanressq),'r');
  set(gca,'XLim',[0.5 tob+0.5]);
  title(['RMSEP of the objects of the training set' ]);
  figure(gcf)
end
figure(2)
[a,b]=hist(sqrt(meanressq),100);
bar(b,a,'r');

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费观看30秒视频久久| 成人午夜看片网址| 成人美女视频在线看| 欧美日韩卡一卡二| 中文字幕亚洲电影| 国产成人精品免费视频网站| 欧美精品视频www在线观看| 亚洲免费观看在线视频| 国产宾馆实践打屁股91| 日韩视频一区二区在线观看| 亚洲国产精品嫩草影院| 99国产精品久久久久久久久久| 日韩欧美的一区| 三级精品在线观看| 欧美色图激情小说| 亚洲一区二区美女| 欧美经典一区二区| 日韩精品成人一区二区在线| 日本女优在线视频一区二区 | 91成人免费在线| 中文字幕乱码久久午夜不卡| 在线观看成人小视频| 国产精品乱码久久久久久| 国产精品一区二区久激情瑜伽| 日韩一区二区三区观看| 日本美女一区二区三区视频| 欧美一级理论片| 麻豆91精品91久久久的内涵| 欧美精品高清视频| 午夜精品福利一区二区三区av| 精品视频在线免费观看| 午夜精品久久久久久久久| 欧美疯狂性受xxxxx喷水图片| 五月婷婷欧美视频| 在线播放中文一区| 国产精品一区免费在线观看| 97久久超碰精品国产| 欧美精品丝袜久久久中文字幕| 中文字幕佐山爱一区二区免费| www.欧美日韩国产在线| 亚洲男人电影天堂| 欧美狂野另类xxxxoooo| 青青草97国产精品免费观看无弹窗版| 欧美一区二区免费| 国产馆精品极品| 亚洲欧美一区二区视频| 欧美日韩午夜精品| 狠狠久久亚洲欧美| 成人欧美一区二区三区视频网页| 欧洲一区在线观看| 美女在线视频一区| 中文字幕av一区二区三区高| 色婷婷av一区二区三区gif| 午夜精品福利视频网站| 久久先锋影音av鲁色资源| 懂色av一区二区在线播放| 亚洲男人的天堂av| 日韩欧美综合一区| 99精品黄色片免费大全| 日韩中文欧美在线| 国产精品国产a| 91精品婷婷国产综合久久性色 | 久久久久久综合| 日本久久精品电影| 免费在线观看一区| 日本一区二区久久| 在线免费观看日本一区| 久久久久久久综合| 亚洲九九爱视频| 欧美一区中文字幕| 不卡av电影在线播放| 日韩一区精品视频| 综合中文字幕亚洲| 精品久久久久久综合日本欧美| 波多野结衣精品在线| 美女视频一区在线观看| 一区二区不卡在线视频 午夜欧美不卡在 | 精品奇米国产一区二区三区| 国产夫妻精品视频| 日韩精品电影在线观看| 亚洲免费在线播放| 欧美激情一区二区三区在线| 91精品黄色片免费大全| 色呦呦一区二区三区| 国产成人啪免费观看软件 | 日韩精品专区在线影院观看| 成人午夜视频网站| 国产精品一区免费视频| 国产精品美女视频| 日本道在线观看一区二区| 国产伦精品一区二区三区视频青涩 | 欧美变态凌虐bdsm| 欧美在线小视频| 91视频免费观看| 国产成人福利片| 极品少妇一区二区三区精品视频 | 亚洲大片精品永久免费| 中文字幕亚洲视频| 国产精品天美传媒沈樵| 久久色成人在线| 26uuu国产日韩综合| 在线观看日韩电影| 久久精品人人做人人综合| 欧美巨大另类极品videosbest | 国产乱妇无码大片在线观看| 成人午夜碰碰视频| 在线观看av一区二区| 色激情天天射综合网| 国产91在线观看| 国产精品资源网| 国产剧情av麻豆香蕉精品| 国产美女视频一区| 国产成人免费在线观看不卡| 国内欧美视频一区二区| 国产麻豆视频一区| 成人免费视频app| 91亚洲国产成人精品一区二三| 不卡av在线网| 一本大道久久a久久综合| 97se亚洲国产综合自在线不卡| 色偷偷久久人人79超碰人人澡 | 欧美一级久久久久久久大片| 欧美一个色资源| 久久婷婷综合激情| 中文在线免费一区三区高中清不卡| 免费成人在线观看| 美腿丝袜亚洲色图| 国产精品主播直播| 99r精品视频| 色视频一区二区| 337p亚洲精品色噜噜狠狠| 日韩精品中文字幕在线一区| 国产亚洲欧洲997久久综合| 中文字幕高清不卡| 亚洲第一av色| 极品尤物av久久免费看| 99久久伊人久久99| 欧美日韩国产一级| 久久一留热品黄| 中文字幕一区二区三区不卡| 午夜视黄欧洲亚洲| 国产一区二区调教| 99精品欧美一区二区三区综合在线| 欧美日韩一区在线观看| 久久尤物电影视频在线观看| 亚洲人妖av一区二区| 奇米色777欧美一区二区| 国产福利不卡视频| 9191精品国产综合久久久久久| 久久婷婷一区二区三区| 亚洲国产你懂的| 国产精品1区二区.| 欧美日韩亚洲综合在线 | 一区二区久久久| 激情六月婷婷久久| 欧美视频你懂的| 国产亚洲一区二区三区四区| 亚洲午夜精品一区二区三区他趣| 国产乱子轮精品视频| 欧美日韩国产小视频| 中文字幕欧美区| 九一九一国产精品| 欧美三区免费完整视频在线观看| 国产亚洲综合在线| 石原莉奈在线亚洲三区| 色综合天天综合网天天狠天天| 久久女同性恋中文字幕| 丝袜亚洲另类欧美| 欧美亚洲动漫另类| 国产欧美日韩另类一区| 麻豆精品视频在线观看视频| 欧美中文字幕一区| 亚洲欧美日本在线| 国产成人精品www牛牛影视| 欧美福利视频一区| 亚洲国产综合色| 色婷婷一区二区三区四区| 国产精品区一区二区三区| 国产综合色在线| 欧美va在线播放| 热久久国产精品| 6080亚洲精品一区二区| 亚洲电影一级片| 欧美性色aⅴ视频一区日韩精品| 国产精品久久久久影院亚瑟| 丰满少妇在线播放bd日韩电影| 精品国产乱码久久久久久影片| 蜜桃精品视频在线观看| 91精品国产免费久久综合| 日韩中文欧美在线| 91精品欧美一区二区三区综合在| 天堂久久一区二区三区| 欧美精品在线观看一区二区| 天堂一区二区在线| 制服视频三区第一页精品| 免费观看日韩电影| 欧美tickle裸体挠脚心vk| 国产综合色在线视频区| 日本一区二区三区国色天香| 成人app软件下载大全免费|