Skip to content

Commit b51dd4a

Browse files
committed
add comments
1 parent 58b5bd0 commit b51dd4a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

runtime/databricks/automl_runtime/forecast/utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,12 @@ def generate_cutoffs(df: pd.DataFrame, horizon: int, unit: str,
190190
def generate_custom_cutoffs(df: pd.DataFrame, horizon: int, unit: str,
191191
split_cutoff: pd.Timestamp) -> List[pd.Timestamp]:
192192
"""
193-
Generate cutoff times for cross validation with the control of number of folds.
193+
Generate custom cutoff times for cross validation based on user-specified split cutoff.
194+
Period (step size) is 1.
194195
:param df: pd.DataFrame of the historical data.
195196
:param horizon: int number of time into the future for forecasting.
196197
:param unit: frequency unit of the time series, which must be a pandas offset alias.
197-
:param num_folds: int number of cutoffs for cross validation.
198-
:param seasonal_period: length of the seasonality period.
199-
:param seasonal_unit: Optional frequency unit for the seasonal period. If not specified, the function will use
200-
the same frequency unit as the time series.
198+
:param split_cutoff: the user-specified cutoff, as the starting point of cutoffs
201199
:return: list of pd.Timestamp cutoffs for cross-validation.
202200
"""
203201
period = 1

runtime/tests/automl_runtime/forecast/utils_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def test_generate_cutoffs_success_annualy(self):
179179

180180

181181
class TestTestGenerateCustomCutoffs(unittest.TestCase):
182+
182183
def test_generate_custom_cutoffs_success_hourly(self):
183184
df = pd.DataFrame(
184185
pd.date_range(start="2020-07-01", periods=168, freq='h'), columns=["ds"]

0 commit comments

Comments
 (0)