On Mon, May 18, 2009 at 9:35 AM, wrote:
> On Mon, May 18, 2009 at 10:55 AM, Charles R Harris
> wrote:
> >
> >
> > 2009/5/18 Stéfan van der Walt
> >>
> >> 2009/5/18 Sebastian Walter :
> >> > B = numpy.dot(A.T, A)
> >>
> >> This multiplication should be avoided whenever possible -- you are
> >> e
On Mon, May 18, 2009 at 10:55 AM, Charles R Harris
wrote:
>
>
> 2009/5/18 Stéfan van der Walt
>>
>> 2009/5/18 Sebastian Walter :
>> > B = numpy.dot(A.T, A)
>>
>> This multiplication should be avoided whenever possible -- you are
>> effectively squaring your condition number.
>
> Although the cond
2009/5/18 Stéfan van der Walt
> 2009/5/18 Sebastian Walter :
> > B = numpy.dot(A.T, A)
>
> This multiplication should be avoided whenever possible -- you are
> effectively squaring your condition number.
>
Although the condition number doesn't mean much unless the columns are
normalized. Having
2009/5/18 Stéfan van der Walt :
> 2009/5/18 Sebastian Walter :
>> B = numpy.dot(A.T, A)
>
> This multiplication should be avoided whenever possible -- you are
> effectively squaring your condition number.
Indeed.
>
> In the case where you have more rows than columns, use least squares.
> For squar
2009/5/18 Sebastian Walter :
> B = numpy.dot(A.T, A)
This multiplication should be avoided whenever possible -- you are
effectively squaring your condition number.
In the case where you have more rows than columns, use least squares.
For square matrices use solve. For large sparse matrices, use
Alternatively, to solve A x = b you could do
import numpy
import numpy.linalg
B = numpy.dot(A.T, A)
c = numpy.dot(A.T, b)
x = numpy.linalg(B,c)
This is not the most efficient way to do it but at least you know
exactly what's going on in your code.
On Sun, May 17, 2009 at 7:21 PM, wrote:
> O
On Sun, May 17, 2009 at 12:14 PM, Quilby wrote:
> Right the dimensions I gave were wrong.
> What do I need to do for m>=n (more rows than columns)? Can I use the
> same function?
>
> When I run the script written by Nils (thanks!) I get:
> from numpy.random import rand, seed
> ImportError: No
Right the dimensions I gave were wrong.
What do I need to do for m>=n (more rows than columns)? Can I use the
same function?
When I run the script written by Nils (thanks!) I get:
from numpy.random import rand, seed
ImportError: No module named random
But importing numpy works ok. What do I
On 5/16/2009 9:01 AM Quilby apparently wrote:
> Ax = y
> Where A is a rational m*n matrix (m<=n), and x and y are vectors of
> the right size. I know A and y, I don't know what x is equal to. I
> also know that there is no x where Ax equals exactly y.
If m<=n, that can only be true if there are no
On Sat, May 16, 2009 at 9:01 AM, Quilby wrote:
> Hi-
> This is what I need to do-
>
> I have this equation-
>
> Ax = y
>
> Where A is a rational m*n matrix (m<=n), and x and y are vectors of
> the right size. I know A and y, I don't know what x is equal to. I
> also know that there is no x where A
On Sat, 16 May 2009 16:01:00 +0300
Quilby wrote:
> Hi-
> This is what I need to do-
>
> I have this equation-
>
> Ax = y
>
> Where A is a rational m*n matrix (m<=n), and x and y are
>vectors of
> the right size. I know A and y, I don't know what x is
>equal to. I
> also know that there is n
Hi-
This is what I need to do-
I have this equation-
Ax = y
Where A is a rational m*n matrix (m<=n), and x and y are vectors of
the right size. I know A and y, I don't know what x is equal to. I
also know that there is no x where Ax equals exactly y. I want to find
the vector x' such that Ax' is
12 matches
Mail list logo