带突变的趋势描述测试过程

带突变的趋势描述测试过程

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