资源简介

光谱信息的特征选择,通过云永欢等提出的VCPA来进行光谱信息的特征选择(文件中包含了VCPA,IRIV,VCPA-GA以及VCPA-IRIV等光谱的变量选择算法)。In this study, we propose a hybrid variable selection strategy based on the continuous shrinkage of variable space which is the core idea of variable combination population analysis (VCPA). The VCPA-based hybrid strategy continuously shrinks the variable space from big to small and optimizes it based on modified VCPA in the first step. It then employs iteratively retaining informative variables (IRIV) and a genetic algorithm (GA) to carry out further optimization in the second step. It takes full advantage of VCPA, GA, and IRIV, and makes up for their drawbacks in the face of high numbers of variables. Three NIR datasets and three variable selection methods including two widely-used methods (competitive adaptive reweighted sampling, CARS and genetic algorithm-interval partial least squares, GA–iPLS) and one hybrid method (variable importance in projection coupled with genetic algorithm, VIP–GA) were used to investigate the improvement of VCPA-based hybrid strategy.

资源截图

代码片段和文件信息

function left_variables = backward_elimination(XyAfoldmethodvarnumber)

% Inputs:
%+++ X: The data matrix of size m x p
%+++ y: The reponse vector of size m x 1
%+++ A: the maximal principle to extract.
%+++ fold: the group number for cross validation.
%+++ method : pretreatment method.
%
% Outputs:
%   left_variables : the variables that finally left.



CV=plscvfold(XyAfoldmethod);
RMSECV0 = CV.RMSECV;
screenProcess=nan(size(X2)-1size(X2)+2);

jj=1;
di=1:size(X2);
index=1:size(X2);
while size(X2)>1
    parc=size(X2);
 %   fprintf(‘Cross-validation with whole variables of this turn: %g\n‘RMSECV0);
    screenProcess(jj1)=RMSECV0;
    RMSECV_temp=nan(1parc);    
    i=1;
    for k=1:parc
        cX=X;
        cX(:k)=[];
        CV1=plscvfold(cXyAfoldmethod0);
        RMSECV_temp(k) = CV1.RMSECV;
   %      fprintf(‘Cross-validation  without variables #%g: %g\n‘index(k)RMSECV_temp(k));  
        if di(index(k))==0
            i=i+1;
        else
            %   screenProcess: the screening process of backward_elimination
            screenProcess(jjdi(index(k))+i)=RMSECV_temp(k);
        end
    end 
    [minRMSECVminRMSECVIndex]=min(RMSECV_temp);
    jj=jj+1;
    if minRMSECV<=RMSECV0 
        fprintf(‘Variable #%g has been washed out %d variables have been deleted.\n‘varnumber(minRMSECVIndex)jj-1);
        screenProcess(jj-1end)=index(minRMSECVIndex);
        di(index(minRMSECVIndex))=0;
        X(:minRMSECVIndex)=[];
        index(minRMSECVIndex)=[];
        varnumber(minRMSECVIndex)=[];
        RMSECV0=minRMSECV;
    else
        disp(‘No any variable-deleting is necessary screenning is finished.‘);
   %     disp([‘Left variables: ‘sprintf(‘%g‘varnumber)]);
        break
    end
end

left_variables=varnumber;




 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        1781  2019-02-14 20:26  VCPA based hybrid strategy\backward_elimination.m
     文件      449024  2019-02-14 20:26  VCPA based hybrid strategy\Corn.mat
     文件        1018  2019-02-14 20:26  VCPA based hybrid strategy\Example.m
     文件         729  2019-02-14 20:26  VCPA based hybrid strategy\generate_binary_matrix_IRIV.m
     文件         992  2019-02-14 20:26  VCPA based hybrid strategy\generate_binary_matrix_VCPA.m
     文件        1364  2019-02-14 20:26  VCPA based hybrid strategy\genpls\backw.m
     文件        1266  2019-02-14 20:26  VCPA based hybrid strategy\genpls\BETACDF.M
     文件        2764  2019-02-14 20:26  VCPA based hybrid strategy\genpls\BETAINV.M
     文件        1211  2019-02-14 20:26  VCPA based hybrid strategy\genpls\BETAPDF.M
     文件         208  2019-02-14 20:26  VCPA based hybrid strategy\genpls\checktw.m
     文件         342  2019-02-14 20:26  VCPA based hybrid strategy\genpls\chksubs.m
     文件        3531  2019-02-14 20:26  VCPA based hybrid strategy\genpls\distchck.m
     文件         824  2019-02-14 20:26  VCPA based hybrid strategy\genpls\err_ga.m
     文件        1331  2019-02-14 20:26  VCPA based hybrid strategy\genpls\finv.m
     文件        7013  2019-02-14 20:26  VCPA based hybrid strategy\genpls\gapls.m
     文件        5976  2019-02-14 20:26  VCPA based hybrid strategy\genpls\gaplsopt.m
     文件        6754  2019-02-14 20:26  VCPA based hybrid strategy\genpls\gaplsout.m
     文件        7429  2019-02-14 20:26  VCPA based hybrid strategy\genpls\gaplssp.m
     文件       22119  2019-02-14 20:26  VCPA based hybrid strategy\genpls\hs_err_pid4544.log
     文件       19255  2019-02-14 20:26  VCPA based hybrid strategy\genpls\mangapls.pdf
     文件         726  2019-02-14 20:26  VCPA based hybrid strategy\genpls\plotmore.m
     文件        3645  2019-02-14 20:26  VCPA based hybrid strategy\genpls\plotone.m
     文件        1784  2019-02-14 20:26  VCPA based hybrid strategy\genpls\plsgacv.m
     文件        3479  2019-02-14 20:26  VCPA based hybrid strategy\genpls\predpls.m
     文件         429  2019-02-14 20:26  VCPA based hybrid strategy\genpls\pr_ga.m
     文件          48  2019-02-14 20:26  VCPA based hybrid strategy\genpls\randomiz.m
     文件        1365  2019-02-14 20:26  VCPA based hybrid strategy\genpls\reg_ga.m
     文件         371  2019-02-14 20:26  VCPA based hybrid strategy\genpls\sc_ga.m
     文件        2646  2019-02-14 20:26  VCPA based hybrid strategy\genpls\tilefigs.m
     文件         962  2019-02-14 20:26  VCPA based hybrid strategy\genpls\update.m
     文件        5012  2019-02-14 20:26  VCPA based hybrid strategy\genpls\zoomrb.m
............此处省略56个文件信息

评论

共有 条评论