Python Scipy Demo: Nonlinear Fit of AIDS data to Logistic Growth Model

preview_player
Показать описание
In this video we look at a Python program that uses various modules (including scipy, matplotlib, numpy, pandas, openpyxl) to read in data from an Excel file (on the web), plot it, and fit it to a Logistic Growth Model function. The Logistic Curve has three fitting parameters for the maximum value (of the fit), the position of the halfway point (also the inflection point), and the growth rate. The curve_fit method from scipy allows us to perform a non-linear least-squares fit since the parameters are not simple coefficients. Non-linear fitting done by scipy's curve_fit method needs a starting point for the fit parameters from which to begin an iterative process. The plotting of both data and fit is done with matplotlib.
Рекомендации по теме
Комментарии
Автор

Very interesting! Thank you for sharing your approach.

JackOfAllTrades
Автор

Thanks for sharing. Matplotlib is compatible with pandas series. I'm not sure what error you were running into, but you should be able to plot pandas series without converting to lists.

davidkaftan