linear_trend_degree(inputdata)
(-0.8665321784088783, 5.094899437816308e-08)

temp_trend_desc(-0.8665321784088783)
(-40.90998251556271, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
-38.617856820438746

clf_result = stats.linregress(list(range(1,len(inputdata)+1)),inputdata)
clf_result[2]
-0.893158091932219
结论:只描述整体(大幅下降)

inputdata=[651.3, 768.32, 693.52, 761.85, 745.87, 811.38, 703.73, 654.48, 671.16, 667.6, 748.4, 713.49, 707.3, 719.18, 671.84, 703.41, 721.82, 683.08, 851.32, 550.56, 678.94]
linear_trend_degree(inputdata)
(-0.12711261341398308, 0.40976523292346345)

temp_trend_desc(-0.12711261341398308)
(-7.24416681587112, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
0.16113461483858016

Kendall_change_point_result = Kendall_change_point_detection(inputdata)
Kendall_change_point_result
[]
结论:整体线性回归没通过检验,下降角度较小(-7.24),定基比较小,Mann-Kendall未检测出突变点,“小幅波动”

inputdata=[1127.26, 1368.46, 1306.73, 1233.76, 1294.62, 1643.8, 1774.81, 1320.49, 1358.79, 1399.51, 1225.51, 1212.74, 1551.3, 1535.87, 1426.31, 1538.66, 1317.62, 1510.48, 1490.62, 1492.06, 1081.55]
linear_trend_degree(inputdata)
(0.11712589980483688, 0.5268499847342965)

temp_trend_desc(0.11712589980483688)
(6.680382464798988, ‘呈现上升趋势’)

fixed_base_ratio(inputdata)
11.473655143394387

Kendall_change_point_result = Kendall_change_point_detection(inputdata)
Pettitt_change_point_result = Pettitt_change_point_detection(inputdata)
Buishand_U_change_point_result = Buishand_U_change_point_detection(inputdata)
SNHT_change_point_result = SNHT_change_point_detection(inputdata)
temp_result = Kendall_change_point_result + [Pettitt_change_point_result, Buishand_U_change_point_result, SNHT_change_point_result]
temp_result
[6, 7, 9, 10, 12, 16, 17, 18, 20, 5, 5, 5]
结论:线性拟合未通过,上升角度较小,突变点个数角度,存在”波动性较大“

inputdata=[208.9, 163.03, 182.46, 192.4, 203.42, 194.67, 194.96, 206.91, 167.5, 187.91, 168.09, 162.13, 163.07, 151.44, 154.45, 129.83, 152.3, 147.88, 142.84, 145.91, 144.14]
linear_trend_degree(inputdata)
(-0.7963648846410957, 5.421956927942598e-06)

temp_trend_desc(-0.7963648846410957)
(-38.53258483747809, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
-12.011399917025916

clf_result = stats.linregress(list(range(1,len(inputdata)+1)),inputdata)
clf_result[2]
-0.8197655166686746(R_value)
结论:只描述整体(大幅下降)

inputdata=[624.34, 592.71, 601.44, 604.76, 633.4, 633.62, 633.08, 690.76, 680.37, 660.25, 647.86, 656.8, 687.7, 696.56, 723.5, 671.15, 668.85, 685.61, 705.94, 677.66, 684.91]
linear_trend_degree(inputdata)
(0.7075563781733977, 1.5380245453724886e-05)

temp_trend_desc(0.7075563781733977)
(35.281559383144604, ‘呈现上升趋势’)

fixed_base_ratio(inputdata)
11.257966774631681

clf_result = stats.linregress(list(range(1,len(inputdata)+1)),inputdata)
clf_result[2]
0.7968176989198754
结论:只描述整体(大幅上升)

inputdata=[373.83, 360.82, 410.31, 431.97, 424.58, 410.56, 411.41, 400.28, 380.64, 453.42, 383.21, 381.88, 384.77, 377.31, 355.7, 341.9, 376.79, 378.56, 370.89, 372.19, 374.96]
linear_trend_degree(inputdata)
(-0.363494289068177, 0.03297988224225367)

temp_trend_desc(-0.363494289068177)
(-19.97591660956338, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
-0.10306036892119555

clf_result = stats.linregress(list(range(1,len(inputdata)+1)),inputdata)
clf_result[2]
-0.46661036656878074

Kendall_change_point_result = Kendall_change_point_detection(inputdata)
Pettitt_change_point_result = Pettitt_change_point_detection(inputdata)
Buishand_U_change_point_result = Buishand_U_change_point_detection(inputdata)
SNHT_change_point_result = SNHT_change_point_detection(inputdata)
temp_result = Kendall_change_point_result + [Pettitt_change_point_result, Buishand_U_change_point_result, SNHT_change_point_result]
temp_result
[1, 2, 11, 13, 10, 10]
最终人工确认突变点位置[10]
继续分段描述:

inputdata=[373.83, 360.82, 410.31, 431.97, 424.58, 410.56, 411.41, 400.28, 380.64]
linear_trend_degree(inputdata)
(0.23688920121808374, 0.5313312790411782)

temp_trend_desc(0.23688920121808374)
(13.327086309529246, ‘呈现上升趋势’)

fixed_base_ratio(inputdata)
7.685421324762432
第一段结论:线性拟合未通过,定基比未超过10%,”波动小幅上升“(非线性定义为‘波动’)

inputdata=[383.21, 381.88, 384.77, 377.31, 355.7, 341.9, 376.79, 378.56, 370.89, 372.19, 374.96]
linear_trend_degree(inputdata)
(-0.20794367750280962, 0.4971194461338774)

temp_trend_desc(-0.20794367750280962)
(-11.746890320581201, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
-2.5337867218617864
第二段结论:线性拟合未通过,定基比未超过10%,”波动小幅下降“(非线性定义为‘波动’)
整体结论:可以将突变点去掉

inputdata=[373.83, 360.82, 410.31, 431.97, 424.58, 410.56, 411.41, 400.28, 380.64, 383.21, 381.88, 384.77, 377.31, 355.7, 341.9, 376.79, 378.56, 370.89, 372.19, 374.96]
linear_trend_degree(inputdata)
(-0.4295484464464145, 0.018013745109191456)

inputdata=[373.83, 360.82, 410.31, 431.97, 424.58, 410.56, 411.41, 400.28, 380.64, 383.21, 381.88, 384.77, 377.31, 355.7, 341.9, 376.79, 378.56, 370.89, 372.19, 374.96]
linear_trend_degree(inputdata)
(-0.4295484464464145, 0.018013745109191456)

temp_trend_desc(-0.4295484464464145)
(-23.245866383256402, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
-0.265511458915607
总结论:波动下降(波动小幅下降?????)

inputdata=[271.61, 270.53, 271.44, 276.6, 270.16, 273.18, 278.78, 253.13, 267.67, 266.55, 248.35, 238.43, 230.11, 234.53, 234.69, 222.82, 222.67, 225.55, 225.86, 223.8, 223.18]
linear_trend_degree(inputdata)
(-1.1568185868667065, 2.041742103250886e-09)

temp_trend_desc(-1.1568185868667065)
(-49.15856026763659, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
-12.770717077607609
结论:只描述整体(大幅下降)

inputdata=[254.02, 250.17, 262.04, 299.15, 257.98, 268.93, 263.08, 245.14, 244.04, 255.79, 230.35, 236.36, 225.21, 225.53, 211.39, 207.52, 218.59, 221.68, 225.75, 224.15, 216.65]
linear_trend_degree(inputdata)
(-0.653832253090138, 7.713784628140091e-06)

temp_trend_desc(-0.653832253090138)
(-33.17795372491338, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
-10.712188246349006
结论:只描述整体(大幅下降)

inputdata=[1170.68, 1154.53, 1335.84, 1695.15, 1674.96, 1625.24, 951.38, 1329.85, 1498.38, 1341.85, 1296.81, 1356.44, 1238.63, 1261.83, 1701.69, 1342.33, 548.0, 464.92, 1016.87, 1128.53]
linear_trend_degree(inputdata)
(-0.37935809753285904, 0.05328927107562258)

temp_trend_desc(-0.37935809753285904)
(-20.7746465360049, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
8.972835661900255

plt.plot(inputdata)
plt.show()
Kendall_change_point_result = Kendall_change_point_detection(inputdata)
Pettitt_change_point_result = Pettitt_change_point_detection(inputdata)
Buishand_U_change_point_result = Buishand_U_change_point_detection(inputdata)
SNHT_change_point_result = SNHT_change_point_detection(inputdata)
temp_result = Kendall_change_point_result + [Pettitt_change_point_result, Buishand_U_change_point_result, SNHT_change_point_result]
temp_result
[1, 2, 6, 7, 10, 16, 16, 16]
最终人工确认突变点位置[6,16]
继续分段描述:

inputdata=[1170.68, 1154.53, 1335.84, 1695.15, 1674.96]
linear_trend_degree(inputdata)
(1.1462247049683696, 0.02357348822772374)

temp_trend_desc(1.1462247049683696)
(48.897602701912206, ‘呈现上升趋势’)

fixed_base_ratio(inputdata)
38.07964928094398

inputdata=[951.38, 1329.85, 1498.38, 1341.85, 1296.81, 1356.44, 1238.63, 1261.83, 1701.69]
linear_trend_degree(inputdata)
(0.4073462968639629, 0.15196605043808684)

temp_trend_desc(0.4073462968639629)
(22.16334281294313, ‘呈现上升趋势’)

fixed_base_ratio(inputdata)
4.719534555152499

inputdata=[548.0, 464.92, 1016.87, 1128.53]
linear_trend_degree(inputdata)
(1.0368469432347311, 0.10766365816987374)

temp_trend_desc(1.0368469432347311)
(46.036378354375856, ‘呈现上升趋势’)

fixed_base_ratio(inputdata)
66.79508717650593

去掉突变点:

inputdata=[1170.68, 1154.53, 1335.84, 1695.15, 1674.96, 951.38, 1329.85, 1498.38, 1341.85, 1296.81, 1356.44, 1238.63, 1261.83, 1701.69, 548.0, 464.92, 1016.87, 1128.53]
linear_trend_degree(inputdata)
(-0.3579683865257961, 0.09126976605070292)

temp_trend_desc(-0.3579683865257961)
(-19.695761829036606, ‘呈现下降趋势’)

fixed_base_ratio(inputdata)
6.265415659441947

突变点检测:带突变的趋势描述测试过程相关推荐

  1. mk突变点检测_Mann-Kendall突变检测(mk突变检测)

    本帖最后由 vb1987 于 2013-6-12 23:27 编辑 %最近写论文需要用到MK检验法,网上收集到大量的matlab代码,但是没有一个代码能够 %完全正确运行或者分析信息不全,结合多位网友 ...

  2. python:遥感时间序列处理——Pettitt突变点检测(突变时间/年份)

    本文记录了使用python语言和Pettitt突变检测算法检测遥感数据30年的NDVI时间序列中的突变时间(年份)的代码. Pettitt可以检测时间序列中最显著的突变点,其检测结果只有一个,相对MK ...

  3. mk突变点检测_MK突变检测程序

    MannKendall 突变检测算法 MATLAB 源码 题目: MannKendall 突变检测算法 MATLAB 源码 %% 以下是单边 MannKendall 突变检测算法 % GreenSim ...

  4. mk突变点检测_mk突变检测

    寄信人: fig ([晋]『康杰中学』) 标 题: 没主题 发信站: 南京大学小百合站 (Sun May 23 19:18:25 2010) 来 源: 172.16.74.204 Fortran: p ...

  5. 突变点检测:时间序列趋势描述初步代码(python)

    import numpy as np from statsmodels.tsa.stattools import adfuller as ADFdef trend_desc(inputdata):# ...

  6. python 时间序列突变检测_Python 百度指数突变点检测

    百度指数是一款非常好用的工具,通过它我们能知道某些关键词在过去的一些日子里的热度变化趋势并能够对这些数据进行分析.如果能用得好百度指数,我们将能产出巨大的价值.你可以通过关注文章下方的Python实用 ...

  7. mk突变点检测_气候突变检测

    1.气候突变是什么意思 科学家们所说的气候变化,通常指的是"气候渐变".也就是我们经常说的,"地球在逐渐变暖",或者是"气候在慢慢变暖".但 ...

  8. 突变点检测:时间序列趋势检验以及突变点检测任务简说

    最近因业务需求,需要对时间序列数据进行趋势描述和突变点检测,做一个程序自动识别趋势变化趋势.然而趋势以及突变点检测的方法发展较为缓慢,近年来也没有什么新的方法出现.我做的也比较浅显,后续继续探索补充算 ...

  9. 突变点检测:Mann-Kendall突变点检测(python)

    不废话,直接上python代码 # Mann-Kendall突变点检测 # 数据序列y # 结果序列UF,UB #------------------------------------------- ...

最新文章

  1. Pytorch中改变形状和交换维度详解:view()、reshape()、transpose()、permute()以及contiguous()
  2. 怎么快速把语音转成文字
  3. vue中key的作用
  4. 一些小标签(上标下标下划线等)
  5. a标签,选中当前菜单后高亮
  6. Lombok — Java代码自动生成 开发利器
  7. Spring Boot之程序性能监控
  8. hibernate多对多、正向工程创建数据表——访问温馨提示
  9. 华锋e路航x10升级工具_电芯终身质保,续航301公里的奔奔E-star代步如何?
  10. 【Clickhouse】Too many partitions for single INSERT block (more than 100)
  11. 计算机系统 cpu课程,计算机操作系统
  12. SharePoint Designer 2010中的外部内容类型-SQL Server
  13. 通过网页链接调用QQ临时会话实现
  14. linux镜像下载和vmware虚拟主机部署
  15. HealthKit Swift 教程: 开始
  16. 流量计算机常见故障,流量计40个常见故障、处理方法!多数人看完就收藏
  17. 微信小游戏教程(三) 新手教程
  18. 百度地图迁徙大数据_百度地图迁徙大数据:除武汉外多地出行趋势回升
  19. 详解 WebRTC 高音质低延时的背后—AGC 自动增益控制
  20. 使用uPnP在路由器上映射端口

热门文章

  1. 一文看懂「生成对抗网络 - GAN」基本原理+10种典型算法+13种应用
  2. MySQL 中你应该使用什么数据类型表示时间?
  3. 基于STM32风速风向检测仿真
  4. CTP报单交易指令(一)限价单
  5. 【CSS3 属性】CSS 3 transform:scale 与 transform:translate 作用在同一div元素,导致元素位置偏离
  6. 【渝粤题库】广东开放大学 文化创意学 形成性考核 (2)
  7. 计算机应用能力考试裸考,五分钟拯救裸考生,计算机二级这样就能过
  8. 【解决】subprocess.CalledProcessError: Command ‘(‘lsb_release‘, ‘-a‘)‘ returned non-zero exit status 127
  9. Java基于springboot+vue的流浪动物救助收养平台 nodejs 前后端分离
  10. 关于中科院力学所怀柔试验基地被非法拆毁的严正声明 ZZ