<jupyter_start><jupyter_text><jupyter_code>%load_ext autoreload
%autoreload 2
# pip install git+https://github.com/benman1/time-series.git
from time_series.dataset.utils import get_energy_demand
from time_series.dataset.time_series import TrainingDataSet
from time_series.models.gaussian_process import GaussianProcess

train_df = get_energy_demand()
tds2d = TrainingDataSet(train_df.head(500), train_split=0.1, two_dim=True)
train_df.head()
train_df.columns
train_df.describe()
# please note this only works in tensorflow Eager mode!
N_EPOCHS = 100
gp = GaussianProcess(tds2d)
gp.instantiate_and_fit(maxiter=N_EPOCHS)
from time_series.utils import evaluate_model

y_predicted = gp.predict(tds2d.X_test)[0].numpy().reshape(-1, tds2d.dimensions, tds2d.n_steps)
evaluate_model(tds=tds2d, y_predicted=y_predicted, columns=train_df.columns, first_n=10)<jupyter_output>MSE: 0.4221
----------
CT: 1.68
MASS: 1.12
ME: 1.51
NEMASSBOST: 0.86
NH: 1.62
RI: 1.02
SEMASS: 1.0
TOTAL: 1.38
VT: 1.75
WCMASS: 1.59
{'fraction_non_alphanumeric': 0.11847389558232932, 'fraction_numerical': 0.05421686746987952, 'mean_word_length': 6.440298507462686, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '323555', 'license': 'MIT', 'n_tokens_mistral': 436, 'n_tokens_neox': 398, 'n_words': 75, 'path': 'notebooks/gaussian_process.ipynb', 'repo_name': 'benman1/time-series', 'size': '996'}