Re: Multidimensional Fitting

2010-07-20 Thread Robert Kern
On 7/20/10 11:56 PM, D2Hitman wrote: Robert Kern-2 wrote: Don't try to fit a Gaussian to a histogram using least-squares. It's an awful way to estimate the parameters. Just use np.mean() and np.cov() to estimate the mean and covariance matrix directly. Ok, what about distributions other th

Re: Multidimensional Fitting

2010-07-20 Thread D2Hitman
other than gaussian? Would you use leastsq in that case? If yes, i will post that to the scipy mailing list. -- View this message in context: http://old.nabble.com/Multidimensional-Fitting-tp29221343p29221776.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://m

Re: Multidimensional Fitting

2010-07-20 Thread Robert Kern
On 7/20/10 10:13 PM, D2Hitman wrote: I want to fit an n-dimensional distribution with an n-dimensional gaussian. So far i have managed to do this in 2d (see below). I am not sure how to convert this to work in n-dimensions. Using "ravel" on the arrays is not ideal, but optimize does not appear t

Multidimensional Fitting

2010-07-20 Thread D2Hitman
gauss2d(plsq, _x,_y) / plsq[0]) -- View this message in context: http://old.nabble.com/Multidimensional-Fitting-tp29221343p29221343.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list