Skip to content
Snippets Groups Projects
Commit 15878e80 authored by Niklas Selke's avatar Niklas Selke
Browse files

Finished the data deseasonalization code.

parent 530e878b
No related branches found
No related tags found
2 merge requests!5Modified the test for the 'value_count' statistic. Now all available sampling...,!3Niklas issue009 feat calculate quantile regression
......@@ -22,4 +22,8 @@ def deseasonalize(data):
"+np.cos(month*4*np.pi/12)+np.sin(month*4*np.pi/12)",
pd.DataFrame({"value": data["value"], "month": data.index.month})
).fit(method="qr").predict(pd.DataFrame({"month": range(1, 13)}))
return data
idx = data.index
return pd.DataFrame({
"value": data["value"].values - seasonal_cycle[idx.month-1].values,
"datetime": (idx.year-2000)*12 + idx.month
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment