getresidual.m

来自「Continuous Profile Models (CPM) Matlab T」· M 代码 · 共 14 行

M
14
字号
% function dist = getResidual(latentTrace,sample,st,G,sampleNum);%% Calculate the residual of sample to latent trace with scaling,% etc. as prescrbied by st and G, where st is the viterbi alignmentfunction dist = getResidual(latentTrace,sample,st,G,sampleNum);tempB=G.u(sampleNum)*2.^(G.scales(st(:,1)));prediction=sample(:)./tempB(:);myMu=latentTrace(st(:,2))';avgSquareResidual = sum((prediction'-myMu).^2)/length(prediction);dist=avgSquareResidual;

⌨️ 快捷键说明

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