趋势和季节调整有什么区别?

问题描述 投票:0回答:1

我尝试了季节性https://github.com/welch/seasonal的“示例用法”。代码如下。

import math
from seasonal import fit_seasons,adjust_seasons
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

s = [10 * math.sin(i * 2 * math.pi / 25) + i * i /100.0 for i in range(100)]
seasons,trend = fit_seasons(s)

adjusted = adjust_seasons(s,seasons=seasons)

residual = adjusted -trend

调整和趋势有什么区别?

python-3.x statistics time-series
1个回答
0
投票

这是“经季节性调整”的数据;即提取季节性成分的数据。如果信号是Y并且分解被写为Y = S + T + R,其中S是季节性成分,T是趋势,R是残差,那么“经季节性调整”的结果只是T + R

© www.soinside.com 2019 - 2024. All rights reserved.