python:最小二乘估计?
我知道如何通过初等矩阵分解和其他运算来实现最小二乘,但如何在 Python 中实现呢? (我从未尝试过在Python中使用矩阵)
(澄清编辑以满足先拍后问问题-1'er)
我正在寻求帮助以了解如何在Python中使用数值编程。看起来 numpy 和 scipy 是正确的选择。我一直在寻找如何使用它们,但我找到了一个教程。
I know how to implement least-squares with elementary matrix decomposition and other operations, but how can I do it in Python? (I've never tried to use matrices in Python)
(clarification edit to satisfy the shoot-first-and-ask-questions-later -1'er)
I was looking for help to find out how to use numerical programming in Python. Looks like numpy and scipy are the way to go. I was looking for how to use them, but I found a tutorial.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
scipy
和numpy
是这里显而易见的方法。请注意,
numpy
使用著名的(且经过良好优化的)BLAS 库,因此它也非常快。比任何“纯蟒蛇”都要快得多。scipy
andnumpy
is the obvious way to go here.Note that
numpy
uses the famous (and well-optimized) BLAS libraries, so it is also very fast. Much faster than any "pure python" will ever be.看看 SciPy。它有矩阵运算。
Have a look at SciPy. It's got matrix operations.
啊哈,这个 numpy 教程 给了我一个很好的起点。
Aha, this tutorial for numpy gives me a good starting point.