getguessvec.m
来自「Continuous Profile Models (CPM) Matlab T」· M 代码 · 共 43 行
M
43 行
% function vec = getGuessVec(G)%% Given the parameters in G, build a vector of paramters to be% used as initializating to our minimization routine when doing% direct gradient ascent rather than EM.%% This takes log(G.z) for z so that we can ensure z is positive alwaysfunction vec = getGuessVec(G)vec = [];if (G.updateZ) if (G.useLogZ) vec = [vec; log(G.z(:))]; else vec = [vec; G.z(:)]; endendif (G.updateU) vec = [vec; G.u(:)];end%% we want to restrict sigma so that there is only one per classif (G.updateSigma) tmpSigmas = []; for cc=1:G.numClass thisInd = G.class{cc}; thisInd = thisInd(1); tmpSigmas = [tmpSigmas; G.sigmas(thisInd)]; end vec = [vec; tmpSigmas];endif (G.updateTime) vec = [vec; G.d];end if (G.updateScale) vec = [vec; G.S];end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?