-
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
Add VecMVM #61
base: master
Are you sure you want to change the base?
Add VecMVM #61
Conversation
val newGrad = grad(i)(j) / (math.sqrt(his(i)(j)) + eps) | ||
if(newGrad != 0.0) { | ||
factors(i)(j) -= stepSize * (newGrad + factors(i)(j) * regParamL2) | ||
if(shrinkageVal > 0) { |
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.
L1 的参数大于0时,会导致精度下降. 可以试试这里的算法, 在我的测试中效果还不错.
似乎有一些bug ,我跑的结果不太对:
|
Haipeng, would you please take a look? Get Outlook for iOS On Sat, Aug 13, 2016 at 10:07 PM -0700, "Guoqiang Li" notifications@github.com wrote: 似乎有一些bug ,我跑的结果不太对:
You are receiving this because you are subscribed to this thread. |
extDataSet.count() | ||
|
||
def run(iterations: Int): Unit = { | ||
var his = Array.fill(featureSize + views.length, rank)(0.0) |
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.
可以移到外面.放到类里面像这样:
@transient private lazy val his = Array.fill(featureSize + views.length, rank)(0D)
可以看下我测试的分支: |
No description provided.