adding headers to some files.
This commit is contained in:
@@ -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.
|
||||||
@@ -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, Tuple
|
from typing import List, Optional, Tuple
|
||||||
import os
|
import os
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
@@ -226,6 +240,9 @@ def run_timegpt(
|
|||||||
df=padded_train_df, h=horizon, level=level, freq=freq, chunk_size=chunk_size
|
df=padded_train_df, h=horizon, level=level, freq=freq, chunk_size=chunk_size
|
||||||
)
|
)
|
||||||
total_time = time() - init_time
|
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:
|
for lvl in level:
|
||||||
if f"{model.alias}-lo-{lvl}" not in fcsts_df.columns:
|
if f"{model.alias}-lo-{lvl}" not in fcsts_df.columns:
|
||||||
fcsts_df[f"{model.alias}-lo-{lvl}"] = fcsts_df[model.alias]
|
fcsts_df[f"{model.alias}-lo-{lvl}"] = fcsts_df[model.alias]
|
||||||
|
|||||||
Reference in New Issue
Block a user