本文介绍了反向输出polyfit numpy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了numpy的polyfit,并为两个数组x和y获得了很好的拟合(使用7阶多项式)。我的关系就是这样;

I have used numpy's polyfit and obtained a very good fit (using a 7th order polynomial) for two arrays, x and y. My relationship is thus;

 c的值,您应该看到代码只对<$的所有随机值有效 degree = 1 时,c $ c> a 。偶尔对其他学位也可以,但是当有很多最小值/最大值时则不行。对于 degree>来说,它永远做不完美。 1 ,因为用平方根函数近似抛物线并不总是有效,等等。

By playing around with the value of degree, you should see that see the code only works well for all random values of a when degree=1. It occasionally does OK for other degrees, but not when there are lots of minima / maxima. It never does perfectly for degree > 1 because approximating parabolas with square-root functions doesn't always work, etc.

这篇关于反向输出polyfit numpy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 03:58