numpy (matrix solver) - python vs. matlab

Russ P. russ.paielli at gmail.com
Tue May 1 16:54:41 EDT 2012


On May 1, 11:52 am, someone <newsbo... at gmail.com> wrote:
> On 04/30/2012 03:35 AM, Nasser M. Abbasi wrote:
>
> > On 04/29/2012 07:59 PM, someone wrote:
> > I do not use python much myself, but a quick google showed that pyhton
> > scipy has API for linalg, so use, which is from the documentation, the
> > following code example
>
> > X = scipy.linalg.solve(A, B)
>
> > But you still need to check the cond(). If it is too large, not good.
> > How large and all that, depends on the problem itself. But the rule of
> > thumb, the lower the better. Less than 100 can be good in general, but I
> > really can't give you a fixed number to use, as I am not an expert in
> > this subjects, others who know more about it might have better
> > recommendations.
>
> Ok, that's a number...
>
> Anyone wants to participate and do I hear something better than "less
> than 100 can be good in general" ?
>
> If I don't hear anything better, the limit is now 100...
>
> What's the limit in matlab (on the condition number of the matrices), by
> the way, before it comes up with a warning ???

The threshold of acceptability really depends on the problem you are
trying to solve. I haven't solved linear equations for a long time,
but off hand, I would say that a condition number over 10 is
questionable.

A high condition number suggests that the selection of independent
variables for the linear function you are trying to fit is not quite
right. For a poorly conditioned matrix, your modeling function will be
very sensitive to measurement noise and other sources of error, if
applicable. If the condition number is 100, then any input on one
particular axis gets magnified 100 times more than other inputs.
Unless your inputs are very precise, that is probably not what you
want.

Or something like that.



More information about the Python-list mailing list