wiener_hopf.m

来自「回声状态神经网络(ESN)是一种性能优异的递归神经网络」· M 代码 · 共 15 行

M
15
字号
function outputWeights = wiener_hopf(stateCollectMat, teachCollectMat)
% computes ESN output weights from collected network states and collected 
% teacher outputs. Mathematically this is a linear regression. 
% Uses the Wiener-Hopf solution, which runs faster (but is less numerically
% stable) than if the weights are computed via the pseudoinverse.

% Created April 30, 2006, D. Popovici
% Copyright: Fraunhofer IAIS 2006 / Patent pending

runlength = size(stateCollectMat,1);
covMat = stateCollectMat' * stateCollectMat / runlength;
pVec = stateCollectMat' * teachCollectMat / runlength;
outputWeights = (inv(covMat) * pVec)';

⌨️ 快捷键说明

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