Curve Fit with Excel and Python

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Hi, maybe this is a basic question but it is one I have struggled finding the answer. I have a random set of values and calculate the fitting parameters mu and std using scipy.stats.norm.fit. I wanted to see what was the difference if I would normally calculate the mean and standard deviation using numpy. To my surprise every time I plotted both pdf and printed the means and std I got from both methods I always get the same exact values so what is the point of norm.fit?


Maybe there is something really obvious Im not seeing.

josemanuelvalladares
Автор

I am trying to solve a similar problem in my work (apply a curve fit model to compute the optimised parameter values), but I am using parameters taken from an Excel file. I'm wanting to adapt your suggestion (which is very useful, by the way) to my work, but I receive an error.

temp = df2['Temperature'].values
growth = df2['Growth rate'].values

def boatman(self, temp, max_growth_rate, min_temp_limit, max_temp_limit, skewness, kurtosis):
return max_temp_limit * (np.sin(np.pi*((temp -

params = [1, 14, 34, 1, 0.5]
c, cov = curve_fit(boatman, temp, growth, params)

print(c)

TypeError: boatman() missing 1 required positional argument: 'kurtosis'

Is there any way I can make this work?

samcoleman
Автор

Why the values for p0 are [100, 0.01, 100, 0.01] and not something else? Also why affect the fitted curve that much if they are initial guesses?

anestistziamtzis
Автор

Since these functions are already available in xl, what is the advantage of using python?

JimWright
Автор

scipy.stats.pearsonr(x, y) also available for R^2

brennanbugbee
Автор

dear professor can you know any kalman filter library which give estimation result after putting A matrix=[[1, 0, dt, 0], [0, 1, 0, dt], [0, 0, 1, 0], [0, 0, 0, 1]], and same way control matrix input matrix estimation process noise, measurement noise and after measurement [x, y] and estimation the position

asifnizamani
Автор

hi! how do we add error if we have 0.5 error for each y data points? thankyou!

syuhada
Автор

Awesome video. Very clear and to the point. Thanks!

donovanadesoro
Автор

sir professor one of the libarary of python in pykalman which written by daniel duckworth sir on their what is transition_offsets, and observation_offsets

asifnizamani
Автор

helo sir!i am learning a lot from your channel ragarding matlab.plz makes some videos on creating GUI in matlab.

musafir