Skip to content

Instantly share code, notes, and snippets.

@erykml
Created July 28, 2022 20:27
Show Gist options
  • Save erykml/afc46d15537a1e93b3ce55c7b61219c8 to your computer and use it in GitHub Desktop.
Save erykml/afc46d15537a1e93b3ce55c7b61219c8 to your computer and use it in GitHub Desktop.
X_2_daily = X_2[["day_sin", "day_cos"]]
model_2 = LinearRegression().fit(X_2_daily.iloc[:TRAIN_END],
y.iloc[:TRAIN_END])
results_df["model_2"] = model_2.predict(X_2_daily)
results_df[["actuals", "model_2"]].plot(figsize=(16,4),
title="Fit using sine/cosine features")
plt.axvline(date(2020, 1, 1), c="m", linestyle="--");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment