立即注册 登录
气象家园 返回首页

一大碗年糕的个人空间 http://bbs.06climate.com/?116087 [收藏] [复制] [分享] [RSS]

日志

趋势分析

热度 1已有 391 次阅读2022-7-21 17:21

通常在做线性倾斜估计时,多用线性回归最小二乘法去拟合并用student-t检验。但利用MK趋势分析(python有pymannkendall包,NCL有trend_manken函数)进行趋势检验时,默认采用的是泰尔-森估算,而并非最小二乘法。当数据存在异常值时,二者差异较大.泰尔-森估算(Theil–Sen estimator)是非参数统计中一种拟合直线的稳健模型,对异常值不敏感,它比非鲁棒简单线性回归明显更准确。
MK趋势检验:
python:
pyMannkendal 是非参数 Mann-Kendall 趋势分析的纯 Python 实现,它汇集了几乎所有类型的 Mann-Kendall Test。目前,这个包有 11 个 Mann-Kendall 检验和 2 个 sen 的斜率估计器函数。
pyMK中代码不适用于新版numpy:修改源码
DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
把错误那行代码里面的np.float(…) 改成np.float64(…)
NCL:
trend_manken
最小二乘和泰尔-森趋势的区别:

全部作者的其他最新日志

发表评论 评论 (1 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 立即注册

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

返回顶部