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

📄 compareblur.m

📁 Continuous Profile Models (CPM) Matlab Toolbox.
💻 M
字号:
function [totalScores AUC]=compareBlur(dat,tryTime,tryMz,timeBlur2,mzBlur2,...    computeROC);%% see how different blurring to correct for residual misalignment%% affects the TVD score, and the AUC, using timeBlur2 and mzBlur2%% amount of blurring on the t-testnumT = length(tryTime);numM = length(tryMz);numClass=2; ind{1}=1:7; ind{2}=8:14;numRep=7;for tt=1:length(tryTime)    for mm=1:length(tryMz)        timeBlur = tryTime(tt);        mzBlur = tryMz(mm);        str=['Blurring: mz=' num2str(mzBlur) ', time=' num2str(timeBlur)];        disp(str);                              %% blur the data, then take one at a time        %% as the 'anchor' which predicts        [blurMat timeVec mzVec] = getBlurMat(timeBlur,mzBlur,0);        global datB;        datB = blurQmz(dat,timeVec,mzVec);                        for cc=1:numClass            tmpScores = zeros(numRep,numRep-1);            thisClassInd = ind{cc};            for anch=1:numRep                anchInd = thisClassInd(anch);                otherInd = setdiff(thisClassInd,anchInd);                for jj=1:length(otherInd)                    thisInd = otherInd(jj);                    tmpScores(anch,jj) = scoreBlur(...                        datB(:,:,anchInd),...                        dat{thisInd});                                 end            end            classScore(tt,mm,cc) = sum(tmpScores(:));        end                if computeROC            [recall{tt,mm} precision{tt,mm} AUC(tt,mm)] = ...                getECCBprecisionRecall('',timeBlur2,mzBlur2);        else            AUC=0;        end                if 0            %% plot the precision/recall curve:            figure,            hold on; plot(recall{tt,mm},precision{tt,mm},'k^--');            title(['Precision/Recall Curve - ' fNameShort{f}]);            ylabel('Precision');            xlabel('Recall');            axis([0 1 0 1]);            grid on;            hold on;        end            endend%% sum out the classestotalScores = sum(classScore,3);

⌨️ 快捷键说明

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