-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SpatialPooler with log boosting #545
base: master
Are you sure you want to change the base?
Conversation
src/htm/algorithms/SpatialPooler.cpp
Outdated
if(boost < htm::Epsilon) return; //skip for disabled boosting | ||
output[i] = exp((targetDensity - actualDensity[i]) * boost); //TODO doc this code | ||
//output[i] = exp((targetDensity - actualDensity[i]) * boost); //exponential boosting, default for Numenta | ||
output[i] = log(actualDensity[i]) / log(targetDensity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance optimizations, which helped when I did this in the columnPooler2
branch.
- Move the
log(targetDensity)
to the outermost loop, since it is constant across all of the mini-columns. In this case calling code contains the loop which you should avoid, not this function. - Use
log2
instead oflog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log2 instead of log
done
log(targetDensity) to the outermost loop, since it is constant
the problem here is I still need to keep local inh working, which changes the density for each column
Thanks for putting in the effort to evaluate this function. What I would really like to see from your analysis are the activation frequencies of the cells (AKA variable |
Log boost(optimized for global inh for this case)
Exp boost (str = 7.0)
Exp, str=2.0
Boosting none
Target sparsity is |
does not require parameter
compared old/tested arrays, not the new values
now logboost has 96.2%
This reverts commit c473c4d.
70062bc
to
8ebb3e0
Compare
instead of current exponential.
Log boosting has been discussed by @ctrl-z-9000-times on the forums and I believe is actually used in #293
I have tried experimenting with it in the SP.
vs