Search code examples
pythonmatrixnumerical-methods

python: least-squares estimation?


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.


Solution

  • scipy and numpy 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.