开发者

Generalized Hebbian Algorithm in ruby or python

开发者 https://www.devze.com 2023-03-05 02:00 出处:网络
Have you a Generalized Hebbian Algorithm written in ruby 开发者_如何学运维or python? I have it implemented from this wiki article, but it computes crazy large numbers.

Have you a Generalized Hebbian Algorithm written in ruby 开发者_如何学运维or python? I have it implemented from this wiki article, but it computes crazy large numbers.

This is the formula in ruby:

@alpha * out[j] * (input[i] - out[j] * sum(@koef.times.map{|k| @weights[k][i] * out[k]})) = -2.97697080169534e+15

Is this wrong? thx


As it seems, you have out[j] once too much. Try:

@alpha*out[j]*(input[i] - sum(@koef.times.map{|k| @weights[k][i] * out[k]}))

Also, notice that alpha should be decreasing with time.

0

精彩评论

暂无评论...
验证码 换一张
取 消