时间序列数据平滑处理

时间序列数据平滑处理:
python tsmoothie包:https://github.com/cerlymarco/tsmoothie/tree/master

学习笔记:
1、安装包:pip install --upgrade tsmoothie
2、测试

Examples
    --------
    >>> import numpy as np
    >>> from tsmoothie.utils_func import sim_randomwalk
    >>> from tsmoothie.smoother import *
    >>> np.random.seed(33)
    >>> data = sim_randomwalk(n_series=10, timesteps=200,
    ...                       process_noise=10, measure_noise=30)
    >>> smoother = KalmanSmoother(component='level_trend',
    ...                           component_noise={'level':0.1, 'trend':0.1})
    >>> smoother.smooth(data)
    >>> low, up = smoother.get_intervals('kalman_interval')
		data['q_smooth'] = smoother.smooth_data[0]  # 获取平滑后的流量值
        data['lower_bound'] = low[0]
        data['upper_bound'] = up[0]
        

3、学习资料
Kalman-and-Bayesian-Filters-in-Python-chinese:https://github.com/artificialIntelligenceStudy/Kalman-and-Bayesian-Filters-in-Python-chinese/tree/chinese

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值