y**3 发帖数: 267 | 1 Hello,
I am building a time series model. The first couple of years I have 8 data
points.
but this year I have 10 data points. I am trying to convert the 10 data
points to 8 proportionally so that I can use all they years data to catch
seasonality( the differences between two nearest neighbors within one year
are different) .
Is there a sound mathematical way to achieve this? Thanks |
E*********g 发帖数: 185 | 2 interpolate to 40 points and pick one every 5. |
y**3 发帖数: 267 | 3 thanks!!!!
planning to do linear interpolation. But what if the relationship is not
straightly linear? Linear interpolation is gonna affect the projection |
E*********g 发帖数: 185 | 4 there are many ways to do interpolation. don't have
to be linear
https://en.wikipedia.org/wiki/Interpolation |
y**3 发帖数: 267 | 5 Thanks!
My problem is I want the original 1st and 10th data points same and turn
the 8 data points in between into 6 data points. So when I apply
interpolation, am I going to only use the 1st and 10th to compute the linear
(if I choose linear interpolation) coefficient? and then compute the other
6?( the original 10 data points are equally spaced). |
E*********g 发帖数: 185 | 6 1 to 10 : 9 spaces
=> 1 to 64: 63 spaces, pick 1 for every 9 points => get 8 points total,
including 1st and 10th
You'better find a library to do it in a non-linear way.
If using python, try:
https://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html |
y**3 发帖数: 267 | |