On Thu, Jan 14, 2010 at 6:26 AM, Nathann Cohen <nathann.co...@gmail.com> wrote: > Hello everybody !!!! > > I have had to write a function for something which may be called > "multivariate polynomial fitting". > > Let's say you have a polynomial in several variables (ex 2) of degree > (ex 2). It has the following shape : a x^2 + b xy + c y^2 + d > > The trouble is that you can evaluate it but you do not know its > coefficients... Algebra tells you that if you can evaluate it at > variable*(degree+1) different points, then you can guess the > coefficients, because they are unique. > > I have written this function ( which is just the inversion of a vector > ) for arbitrary number of variables/dimensions. Scipy seems only to > provide a polyfit function ( in just one variable ), so it is not a > good answer for what I have to do. > > * Do you think such a function would be useful in Sage ? In which > case, where should I write it ?
I think this would be useful over a finite field. In that case, it is likely you'd need to pass to a sufficiently large extension field, since otherwise you may not have "enough points" to separate values. > * Do you think it would be more useful directly in Scipy ? I guess your algorithm is over the reals? Does your algorithm work over QQ? > * Do you think it is useful at all ? > > Thank youuuuuuu !! :-) > > Nathann > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > >
-- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org