[SciPy-User] How to fit data obtained from a Monte Carlo simulation?
D K
canavanin at yahoo.se
Wed Sep 21 10:47:11 EDT 2011
Hi everyone
I would like to fit data obtained from a Monte Carlo simulation to
experimental data, in order to extract two parameters from the
experiments. There are several issues with this:
a) There is a small element of randomness to each simulated data point;
we don't actually have a function describing the curve (the overall
curve shape is reproducible though).
b) I have never performed curve fitting before, and I haven't got a clue
how to even go about looking for the required information.
b) I don't have a strong maths background.
I tried using optimize.leastsq, but I learnt that, apparently, I ought
to know the function describing my data to be able to use this (I kept
researching, as it exited with code 2, claiming that the fit had been
successful, but it mainly returned the initial guess as the fitting
result). So I switched to optimize.fmin (having read that it only uses
the function values); this, however, does not converge and simply exits
after the maximum number of iterations have been performed.
I can post code or further details if required, but perhaps someone on
here might already be able to guess what I might be doing wrong, and/or
point me in the right direction (different fitting function? entirely
different approach to parameter determination?). I would be very
grateful for your help.
Thanks a lot in advance!
Kind regards,
Donata
PS: This is the first time I'm writing to this mailing list, I hope I
will be forgiven in case I made some daft mistake...
More information about the SciPy-User
mailing list