Linked Questions
17 questions linked to/from python numpy/scipy curve fitting
2 votes
0 answers
335 views
Finding max value on raw experimental data [duplicate]
I'm working on an investigation proyect, where I have to plot some experimetal data, and then find the max value (critical point), like on this image: I was trying to adjust a fit curve (using a ...
1 vote
0 answers
175 views
Use curve fitting to approximate a group of many straight line segments in python [duplicate]
Suppose you have a group of connected line segments like in the picture below. How can you find a curve to approximate the collection of line segments as shown in the image on the right? This is ...
6 votes
1 answer
15k views
get function by its values in certain points
Suppose I have a hypotetical function I'd like to approximate: def f(x): return a * x ** 2 + b * x + c Where a, b and c are the values I don't know. And I have certain points where the function ...
3 votes
1 answer
5k views
How to draw a matching Bell curve over a histogram?
My code so far, I'm very new to programming and have been trying for a while. Here I apply the Box-Muller transform to approximate two Gaussian normal distributions starting from a random uniform ...
2 votes
1 answer
5k views
Multivariable Optimization in Python
I have a function with two input variables we are looking to optimise. The function returns an output and we want to minimise this output. What is the best way to do this in Python? Presently the ...
2 votes
1 answer
4k views
Curve Fitting in Python using scipy.optimize curve_fit
As a relative beginner in Python, i'm struggling to understand (and therefore use) the "curve_fit" from scipy.optimize I've tried following answers to previous questions: python numpy/scipy curve ...
0 votes
2 answers
3k views
Python - curve fitting of more complex function
I wish to find the equation of the curve of best fit of the following graph: Which has the equation in the form of: I've attempted to find examples of curve fitting with numpy here and here, but they ...
6 votes
3 answers
727 views
Code to resemble a rowing stroke
I'm working on a small program displaying moving rowing boats. The following shows a simple sample code (Python 2.x): import time class Boat: def __init__(self, pace, spm): self.pace = ...
2 votes
1 answer
3k views
Fitting a curve to a set of data points for time series prediction
I currently have a set of data points (hit counts), which are structured as a time series. The data is something like: time hits 20 200 32 439 57 512 How can I fit a curve to this data ...
1 vote
1 answer
1k views
How can I generate numbers between x and n with a curve with Python?
I'm trying to generate a non-linear curve between two integers, let's say 0 and 25 that matches up to this curve here: It seems like a stupid simple problem, the curve I need even looks like part of a ...
3 votes
1 answer
684 views
Trying to fit a trig function to data with scipy
I am trying to fit some data using scipy.optimize.curve_fit. I have read the documentation and also this StackOverflow post, but neither seem to answer my question. I have some data which is simple, ...
0 votes
1 answer
1k views
What kind of curve-fitting method should I take(python)? [closed]
I got a numpy.ndarray which is something like np.array([(1, 1), (2, 3), (3, 5), (4, 8), (5, 9), (6, 9), (7, 9)]) I'd like to find a curve-fitting method which can do the following two things. It can ...
1 vote
0 answers
1k views
How would I calculate a continuous PDF from discrete data using Python?
I have some discrete data of the beta spectrum of Bismuth-210, which I would like to try to fit a continuous PDF to so I can improve the accuracy of a simulation I'm building. Is there anything in ...
-1 votes
1 answer
787 views
Fitting a power law with known exponent and extracting the coefficient in Python
I have a data set that I know fits to a curve of the form: y = a x² and I want to extract the value of a. What's the best way to go about this in Python (with scipy etc.) ?