I have a time series dataset as follows
day 1 2 3 4 5 6
sales_dept1 0 0 0 3 3 3
sales_dept2 0 0 0 6 6 6
sales_dept3 0 0 0 1 1 1
As you can see, dept2 is most efficient, dept1 is second most efficient and dept3 is less efficient.
In other words, I want to capture the performance diffrences among the departments.
For, that I used Linear Regression
and got the slope as a metric to compare the performace. However, I got the following results as the slope (which do not match with my manual interpretation).
dept1 slope = 1
dept2 slope = 0.5
dept3 slope = 3
My code is as follows.
from sklearn.linear_model import LinearRegression
regressor = LinearRegression()
X = [[0], [0], [0], [3], [3], [3]]
y = [1, 2, 3, 4, 5, 6]
regressor.fit(X, y)
print(regressor.coef_)
Therefore, I think slope is not the correct metric for my situation. Is there any other metric that captures the actual growth change of different time-series data?
I am happy to provide more details if needed.
Update:
Mentioned below are some more data:
[0, 0, 0, 1, 1, 1]
[6, 6, 6, 6, 6, 6]
[0, 0, 0, 0, 0, 10]
[0, 3, 3, 28, 30, 30]
[0, 0, 0, 6, 6, 6]
[0, 0, 0, 0, 0, 10]
[0, 0, 0, 0, 1, 1]
[6, 6, 6, 6, 6, 6]
[0, 0, 0, 0, 1, 1]
[0, 0, 0, 6, 6, 6]
[0, 1, 1, 4, 4, 4]
[3, 19, 19, 47, 64, 90]
[0, 0, 3, 8, 13, 13]
[0, 3, 3, 3, 3, 3]
[0, 0, 0, 6, 6, 6]
[0, 0, 0, 0, 0, 6]
[0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 10]
[0, 0, 0, 0, 0, 6]
[10, 10, 10, 10, 10, 10]
[0, 0, 0, 0, 10, 10]
[0, 0, 0, 7, 7, 15]
[0, 0, 0, 0, 10, 10]
[6, 6, 6, 6, 9, 9]
[6, 6, 6, 6, 6, 6]
[0, 0, 3, 3, 3, 3]
[0, 0, 0, 6, 7, 7]
[0, 3, 4, 4, 4, 4]
[0, 0, 0, 0, 1, 1]
[3, 3, 3, 3, 3, 9]
[0, 0, 6, 6, 6, 6]
[0, 0, 0, 0, 0, 0]
[0, 0, 0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