[Tutor] constrained least square fitting using python

Oscar Benjamin oscar.j.benjamin at gmail.com
Sat Aug 10 03:12:33 CEST 2013


On 10 August 2013 00:00, eryksun <eryksun at gmail.com> wrote:
> On Fri, Aug 9, 2013 at 2:40 PM, Oscar Benjamin
>
> The result from the analytic solution is very close to what minimize()
> got in my example:

That's reassuring.

Which of the two solutions is more accurate in terms of satisfying the
constraint and minimising the objective function? Do they take similar
times to run?

[snip]
> I'm tempted to switch to np.matrix here, which supports infix matrix
> products and exponents. But I'll just break this mess up into temp
> variables:

This probably is a good use for np.matrix (I guess you generally
dislike it for the same reasons I do: explicit is better than implicit
etc.).


Oscar


More information about the Tutor mailing list