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

📄 selectinput.m

📁 The goal of SPID is to provide the user with tools capable to simulate, preprocess, process and clas
💻 M
字号:
function ip=selectInput(feat,y,pall,pars)

K=length(unique(y));c=K-1;
begina=1;
if (sum(pall(1,:)) ~= 0)
    treshold=pars.treshold; 
    ip=zeros(size(feat,1),1);
    for i=1:c,
        ic=find(y~=i);
        pallze=pall(:,i);pallze(ic)=1.1;
        xc=find(pallze<treshold);
        enda = begina + size(xc,1)-1;
        ip(begina:enda)=xc;
        begina=enda +1;
    end
    pref=1-sum(pall,2);
    ic=find(y~=K);
    pref(ic)=1.1;
    xc=find(pref<treshold);
    enda = begina + size(xc,1)-1;
    ip(begina:enda)=xc;
    ip=ip(find(ip));
else
    ip=1:length(y);
end
if length(ip) < 20, ip=1:length(y); disp('Number of selected points too small. Take all!') ; end
if (pars.info==1), disp(['datasetsize:' num2str(length(ip))]);end

⌨️ 快捷键说明

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