TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
Python
adding headers to some files.
Rajat Sen397693a57232
diff --git a/experiments/baselines/__init__.py b/experiments/baselines/__init__.pyindex e69de29..2d9f7b3 100644--- a/experiments/baselines/__init__.py+++ b/experiments/baselines/__init__.py@@ -0,0 +1,13 @@+# Copyright 2024 Google LLC+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.\ No newline at end of filediff --git a/experiments/baselines/timegpt_pipeline.py b/experiments/baselines/timegpt_pipeline.pyindex c4ab40e..c5a38f5 100644--- a/experiments/baselines/timegpt_pipeline.py+++ b/experiments/baselines/timegpt_pipeline.py@@ -1,3 +1,17 @@+# Copyright 2024 Google LLC+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+from typing import List, Optional, Tupleimport osimport pandas as pd@@ -226,6 +240,9 @@ def run_timegpt(df=padded_train_df, h=horizon, level=level, freq=freq, chunk_size=chunk_size)total_time = time() - init_time+ # In case levels are not returned we replace the levels with the mean predictions.+ # Note that this does not affect the results table as we only compare on point+ # forecastign metrics.for lvl in level:if f"{model.alias}-lo-{lvl}" not in fcsts_df.columns:fcsts_df[f"{model.alias}-lo-{lvl}"] = fcsts_df[model.alias]