Open dick7 opened 6 years ago
@dick7 话说这段代码在哪...这个应该是以前的代码
新版是这样的了
def fit_weibull_and_ecdf(df_speed, x=None):
from statsmodels.distributions.empirical_distribution import ECDF
max_speed = df_speed.max()
if x is None:
x = linspace(0, max_speed, 20)
# Fit Weibull, notice loc value 0 or not
weibull_params, y_weibull, density_expected_weibull, y_cdf_weibull = fit_weibull(df_speed, x)
# Fit Ecdf
y_ecdf = ECDF(df_speed)(x)
return x, y_weibull, density_expected_weibull, y_cdf_weibull, weibull_params, y_ecdf
ECDF来自于statsmodels
这个包
是啊,是你以前的版本了
@dick7 换新版本吧...
NameError: name 'sm' is not defined 请问‘sm’在哪里定义的,代表什么意思?