I’m facing an intriguing challenge with curve fitting in Python. I have a damping function that I’m trying to fit to several datasets. However, I’m encountering a situation where the same damping function appears to provide a good fit for two distinct types of data: one exhibiting exponential/polynomial characteristics and the other displaying damped harmonic behavior.
Despite the versatility of the damping function, I’m concerned about the possibility of overfitting or misinterpretation of the underlying data characteristics. I’m seeking advice on how to effectively handle this scenario and ensure that the fitting process accurately captures the distinct features of each dataset.
Damping function I am using :
def damping_sinusoidal(x, A, w, phi, decay):
return A * np.exp(-decay * x) * np.sin(w * x + phi)
Specifically, I’m interested in strategies for distinguishing between the two types of data and selecting only damping function for curve fitting.
Uzumaki Naruto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.