--- title: Dataset Utils keywords: fastai sidebar: home_sidebar summary: "Utils for dataset processing" description: "Utils for dataset processing" nb_path: "nbs/data_datasets__utils.ipynb" ---
import numpy as np
import matplotlib.pyplot as plt
ds = pd.date_range(start='2010-01-01', end='2012-12-31')
holiday_dist_new_year = holiday_kernel(holiday='new_year', dates=ds)
holiday_dist_independence = holiday_kernel(holiday='independence', dates=ds)
fig = plt.figure(figsize=(10,4))
plt.plot(ds, holiday_dist_new_year, label='new_year')
plt.plot(ds, holiday_dist_independence, label='independence')
plt.plot(ds, np.zeros(len(ds)))
plt.title('Holiday Kernels')
plt.grid()
plt.legend()
plt.show()