Clear Filters
Clear Filters

compute weights by Generalized Hebbian Algorithm

2 views (last 30 days)
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 Comment
Lisa Linárd Pedersen
Lisa Linárd Pedersen on 17 Nov 2020
I am currently having the same problem.. I am aware this is 5 years old but did you figure it out?

Sign in to comment.

Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!