使用python statsmodels计算DFFITS需要很长时间

使用python statsmodels计算DFFITS需要很长时间,python,statsmodels,outliers,Python,Statsmodels,Outliers,我使用statsmodels来计算cook的距离和dffits 特征编号:3,样本量:200000 google colab,statsmodels版本:0.10.2 model = sm.OLS(Y,sm.add_constant(X)) results = model.fit() influence = results.get_influence() cooks_d, p_value = influence.cooks_distance dffits, dffits_threshold =

我使用statsmodels来计算cook的距离和dffits

特征编号:3,样本量:200000

google colab,statsmodels版本:0.10.2

model = sm.OLS(Y,sm.add_constant(X))
results = model.fit()

influence = results.get_influence()
cooks_d, p_value = influence.cooks_distance
dffits, dffits_threshold = influence.dffits
我马上就有厨师了,但要花很长时间。如果使用summary_frame(),也需要很长时间

sm_fr = influence.summary_frame()

有什么解决这个问题的建议吗?

试试
dffits\u internal
,它不需要一个完整的留一观察输出循环。