我想知道是哪条线或方法引起了未来警告!
predictors = weekly.columns[1:7] # the lags and volume
X = sm.add_constant(weekly[predictors]) # sm: statsmodels
y = np.array([1 if el=='Up' else 0 for el in weekly.Direction.values])
logit = sm.Logit(y,X)
results=logit.fit()
print(results.summary())
Run Code Online (Sandbox Code Playgroud)
C:\ Anaconda3 \ lib \ site-packages \ numpy \ core \ fromnumeric.py:2389:FutureWarning:方法.ptp已过时,将在以后的版本中删除。请改用numpy.ptp。返回ptp(axis = axis,out = out,** kwargs)