compute weights by Generalized Hebbian Algorithm

2 次查看(过去 30 天)
I have a task to do some calculations in matlab .. I use the Generalized Hebbian Algorithm to compute some weights , here is the functions of Hebbian Algorithm , slice 15 http://www.eit.lth.se/fileadmin/eit/courses/eitn55/Downloads/ICA_Ch6.pdf
here is my code
alfa=0.5;
e=randn(3,5000);
A=[1 0 0;-0.5 0.5 0;0.3 0.1 0.1];
x=A*e;
W=rand(3);
nn=8;
for n=1:nn
y=x*W;
end
k=tril(y'*y)*W;
W(n+1,:)= alfa*(y*x'-k);
In my task I know that x=A*e; but I do not know if I am iterating in correct way or not? is my for loop doing correct? and are those equations below correct?
k=tril(y'*y)*W;
W(n+1,:)= alfa*(y*x'-k);
W(n+1,:) should print out a 3*3 matrix ... Matlab says when I run this code : Error using * Inner matrix dimensions must agree.
  1 个评论
Lisa Linárd Pedersen
I am currently having the same problem.. I am aware this is 5 years old but did you figure it out?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by