Levenberg-Marquardt or Gauss-Newton Go implementation

xuanbao · · 743 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Can anyone point me towards an implementation of one of these methods in Go?</p> <p>I feel like I have translated the Gauss-Newton from a Matlab script into Go correctly, but it is not giving me the correct results. After a few days of banging my head against it, I&#39;m hoping that someone else can show me the way.</p> <p>I think I might be having problems with the matrix manipulation. It&#39;s been 15 years since I did this kind of thing in school and this area of my brain is <em>very rusty</em>.</p> <p>I&#39;ve been using gonum/matrix/mat64 and it seems kind of hard to use compared to matrix libraries in other languages that I&#39;ve used. Is there a better or different choice?</p> <hr/>**评论:**<br/><br/>howeman: <pre><p>As far as I know there is no Levenberg-Marquardt. It&#39;s on my mental list, but I won&#39;t be able to implement it soon. </p> <p>There is a Newton method in the gonum/optimize <a href="https://godoc.org/github.com/gonum/optimize#Newton" rel="nofollow">https://godoc.org/github.com/gonum/optimize#Newton</a>. The entry point to optimize is the local method <a href="https://godoc.org/github.com/gonum/optimize#Local" rel="nofollow">https://godoc.org/github.com/gonum/optimize#Local</a>. Depending at the problem at hand, you may just want to use the default BFGS. The is also <a href="https://godoc.org/github.com/gonum/diff/fd" rel="nofollow">https://godoc.org/github.com/gonum/diff/fd</a> if you need gradients, though as a warning there are some facelift PRs under submission.</p> <p>We&#39;re happy to help answer mat64 questions, either here or (probably better) gonum-dev (<a href="https://groups.google.com/forum/#!forum/gonum-dev" rel="nofollow">https://groups.google.com/forum/#!forum/gonum-dev</a>). As one of the developers I&#39;m biased, but mat64 is the best matrix library for go in my opinion. It&#39;s well tested and feature complete. We are aware we need more usage examples, but to date we&#39;ve been working to make sure it&#39;s feature complete and well tested. If nothing else, your feedback on what you find confusing is valuable for when we create less formal documentation.</p></pre>howeman: <pre><p>Also, please file a feature request in gonum/optimize for these algorithms.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

743 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传