From 67414a4298d733f064e59397675fe11b58d07905 Mon Sep 17 00:00:00 2001 From: Saul Date: Mon, 1 Dec 2025 16:21:24 -0600 Subject: [PATCH 01/13] Adds handler for backslashes for inline math --- mkdocstrings_parser/parser.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mkdocstrings_parser/parser.py b/mkdocstrings_parser/parser.py index fb91c7b..d491022 100644 --- a/mkdocstrings_parser/parser.py +++ b/mkdocstrings_parser/parser.py @@ -10,6 +10,12 @@ # Suppress griffe warnings logging.getLogger("griffe").setLevel(logging.ERROR) +def replace_slashes(match): + # Get the content between $ signs + content = match.group(1) + # Replace double backslashes with single backslashes + fixed = content.replace("\\\\", "\\") + return f"${fixed}$" class MkDocstringsParser: def __init__(self): @@ -136,6 +142,7 @@ def generate_documentation(self, module_path: str, options: Dict[str, Any]) -> s markdown_docs = render_object_docs(obj, config) # type: ignore markdown_docs = markdown_docs.replace(f"### `{to_replace}.", "### `") + markdown_docs = re.sub(r"\$([^$]+)\$", replace_slashes, markdown_docs) return markdown_docs From 6cf45c0afcb9d892c8e73a897e953ab50f3f9353 Mon Sep 17 00:00:00 2001 From: Saul Date: Wed, 3 Dec 2025 12:58:30 -0600 Subject: [PATCH 02/13] Upgrades test for hierarchicalforecast --- tests/test_hierarchicalforecast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_hierarchicalforecast.py b/tests/test_hierarchicalforecast.py index 58c9ef8..5f88a78 100644 --- a/tests/test_hierarchicalforecast.py +++ b/tests/test_hierarchicalforecast.py @@ -167,7 +167,7 @@ def test_bottomup(setup_parser): the first time by Orcutt in 1968. The corresponding hierarchical "projection" matrix is defined as: $$ -\\\\mathbf{P}_{\\\\text{BU}} = \\[\\\\mathbf{0}_{\\\\mathrm{[b],[a]}};|;\\\\mathbf{I}\\_{\\\\mathrm{[b][b]}}\\] +\\mathbf{P}_{\\text{BU}} = \[\\mathbf{0}_{\\mathrm{[b],[a]}};|;\\mathbf{I}\_{\\mathrm{[b][b]}}\] $$
From 237fc4cb93b6e9a0c1eb22f82749085bdfe71513 Mon Sep 17 00:00:00 2001 From: Saul Date: Wed, 3 Dec 2025 13:04:45 -0600 Subject: [PATCH 03/13] Adds TopDown test for hierarchicalforecast --- tests/test_hierarchicalforecast.py | 107 ++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/tests/test_hierarchicalforecast.py b/tests/test_hierarchicalforecast.py index 5f88a78..aa9173a 100644 --- a/tests/test_hierarchicalforecast.py +++ b/tests/test_hierarchicalforecast.py @@ -235,4 +235,109 @@ def test_bottomup(setup_parser): Name | Type | Description ---- | ---- | ----------- `dict` | | y_tilde: Reconciliated y_hat using the Bottom Up approach. -""" \ No newline at end of file +""" + +def test_topdown(setup_parser): + fn = """::: hierarchicalforecast.methods.TopDown + handler: python + options: + docstring_style: google + members: + - fit + - predict + - fit_predict + - sample + inherited_members: false + heading_level: 3 + show_root_heading: true + show_source: true""" + output = setup_parser.process_markdown(fn) + assert output == """### `TopDown` + +```python +TopDown(method) +``` + +Bases: [HReconciler](#hierarchicalforecast.methods.HReconciler) + +Top Down Reconciliation Class. + +The Top Down hierarchical reconciliation method, distributes the total aggregate predictions and decomposes +it down the hierarchy using proportions $\mathbf{p}\_{\mathrm{[b]}}$ that can be actual historical values +or estimated. + +$$\mathbf{P}=\[\mathbf{p}_{\mathrm{[b]}};|;\mathbf{0}_{\mathrm{[b][a,b;-1]}}\]$$ + +**Parameters:** + +Name | Type | Description | Default +---- | ---- | ----------- | ------- +`method` | [str](#str) | One of `forecast_proportions`, `average_proportions` and `proportion_averages`. | *required* + +
+References + +- [CW. Gross (1990). "Disaggregation methods to expedite product line forecasting". Journal of Forecasting, 9 , 233-254. doi:10.1002/for.3980090304](https://onlinelibrary.wiley.com/doi/abs/10.1002/for.3980090304). +- [G. Fliedner (1999). "An investigation of aggregate variable time series forecast strategies with specific subaggregate time series statistical correlation". Computers and Operations Research, 26 , 1133-1149. doi:10.1016/S0305-0548(99)00017-9](). + +
+ +#### `TopDown.fit` + +```python +fit(S, y_hat, y_insample, y_hat_insample=None, sigmah=None, intervals_method=None, num_samples=None, seed=None, tags=None, idx_bottom=None) +``` + +TopDown Fit Method. + +**Parameters:** + +Name | Type | Description | Default +---- | ---- | ----------- | ------- +`S` | | Summing matrix of size (`base`, `bottom`). | *required* +`y_hat` | | Forecast values of size (`base`, `horizon`). | *required* +`y_insample` | [ndarray](#numpy.ndarray) | Insample values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. | *required* +`y_hat_insample` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Insample forecast values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. | None +`sigmah` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Estimated standard deviation of the conditional marginal distribution. | None +`interval_method` | | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`. | *required* +`num_samples` | [Optional](#typing.Optional)\[[int](#int)\] | Number of samples for probabilistic coherent distribution. | None +`seed` | [Optional](#typing.Optional)\[[int](#int)\] | Seed for reproducibility. | None +`tags` | [Optional](#typing.Optional)\[[dict](#dict)\[[str](#str), [ndarray](#numpy.ndarray)\]\] | Each key is a level and each value its `S` indices. | None +`idx_bottom` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Indices corresponding to the bottom level of `S`, size (`bottom`). | None + +**Returns:** + +Name | Type | Description +---- | ---- | ----------- +`self` | | object, fitted reconciler. + +#### `TopDown.fit_predict` + +```python +fit_predict(S, y_hat, tags, idx_bottom=None, y_insample=None, y_hat_insample=None, sigmah=None, level=None, intervals_method=None, num_samples=None, seed=None) +``` + +Top Down Reconciliation Method. + +**Parameters:** + +Name | Type | Description | Default +---- | ---- | ----------- | ------- +`S` | [ndarray](#numpy.ndarray) | Summing matrix of size (`base`, `bottom`). | *required* +`y_hat` | [ndarray](#numpy.ndarray) | Forecast values of size (`base`, `horizon`). | *required* +`tags` | [dict](#dict)\[[str](#str), [ndarray](#numpy.ndarray)\] | Each key is a level and each value its `S` indices. | *required* +`idx_bottom` | [ndarray](#numpy.ndarray) | Indices corresponding to the bottom level of `S`, size (`bottom`). | None +`y_insample` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Insample values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. | None +`y_hat_insample` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Insample forecast values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. | None +`sigmah` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Estimated standard deviation of the conditional marginal distribution. | None +`level` | [Optional](#typing.Optional)\[[list](#list)\[[int](#int)\]\] | float list 0-100, confidence levels for prediction intervals. | None +`intervals_method` | [Optional](#typing.Optional)\[[str](#str)\] | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`. | None +`num_samples` | [Optional](#typing.Optional)\[[int](#int)\] | Number of samples for probabilistic coherent distribution. | None +`seed` | [Optional](#typing.Optional)\[[int](#int)\] | Seed for reproducibility. | None + +**Returns:** + +Name | Type | Description +---- | ---- | ----------- +`y_tilde` | | Reconciliated y_hat using the Top Down approach. +""" From de0adc4b40c00b61c20517e97a62eb699b8905b8 Mon Sep 17 00:00:00 2001 From: Saul Date: Wed, 3 Dec 2025 13:10:59 -0600 Subject: [PATCH 04/13] Favors solution to a lambda function instead of defining new function. --- mkdocstrings_parser/parser.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mkdocstrings_parser/parser.py b/mkdocstrings_parser/parser.py index d491022..6328364 100644 --- a/mkdocstrings_parser/parser.py +++ b/mkdocstrings_parser/parser.py @@ -10,13 +10,6 @@ # Suppress griffe warnings logging.getLogger("griffe").setLevel(logging.ERROR) -def replace_slashes(match): - # Get the content between $ signs - content = match.group(1) - # Replace double backslashes with single backslashes - fixed = content.replace("\\\\", "\\") - return f"${fixed}$" - class MkDocstringsParser: def __init__(self): pass @@ -142,7 +135,12 @@ def generate_documentation(self, module_path: str, options: Dict[str, Any]) -> s markdown_docs = render_object_docs(obj, config) # type: ignore markdown_docs = markdown_docs.replace(f"### `{to_replace}.", "### `") - markdown_docs = re.sub(r"\$([^$]+)\$", replace_slashes, markdown_docs) + # Fix double backslashes in inline/block math equations + markdown_docs = re.sub( + r"\$([^$]+)\$", + lambda m: f"${m.group(1).replace('\\\\', '\\')}$", + markdown_docs + ) return markdown_docs From 6d51add1621bde84d75c628accfe75a0dbb63e20 Mon Sep 17 00:00:00 2001 From: Saul Date: Wed, 3 Dec 2025 13:14:14 -0600 Subject: [PATCH 05/13] Removes f-string --- mkdocstrings_parser/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocstrings_parser/parser.py b/mkdocstrings_parser/parser.py index 6328364..a2d3d73 100644 --- a/mkdocstrings_parser/parser.py +++ b/mkdocstrings_parser/parser.py @@ -138,7 +138,7 @@ def generate_documentation(self, module_path: str, options: Dict[str, Any]) -> s # Fix double backslashes in inline/block math equations markdown_docs = re.sub( r"\$([^$]+)\$", - lambda m: f"${m.group(1).replace('\\\\', '\\')}$", + lambda m: "$" + m.group(1).replace('\\\\', '\\') + "$", markdown_docs ) From a18946b6c5ede7bd51e099d2eb7cec1a6e30e5c8 Mon Sep 17 00:00:00 2001 From: Saul Date: Wed, 3 Dec 2025 13:18:18 -0600 Subject: [PATCH 06/13] Updates testing for utilsforecast migration to narwhals and the cutoff_col --- tests/test_utilsforecast.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_utilsforecast.py b/tests/test_utilsforecast.py index 5460604..b831bfb 100644 --- a/tests/test_utilsforecast.py +++ b/tests/test_utilsforecast.py @@ -12,7 +12,7 @@ def test_utilsforecast_rmae(setup_parser): assert output == """### `rmae` ```python -rmae(df, models, baseline, id_col='unique_id', target_col='y') +rmae(df, models, baseline, id_col='unique_id', target_col='y', cutoff_col='cutoff') ``` Relative Mean Absolute Error (RMAE) @@ -30,10 +30,11 @@ def test_utilsforecast_rmae(setup_parser): `baseline` | [str](#str) | Column that identifies the baseline model predictions. | *required* `id_col` | [str](#str) | Column that identifies each serie. Defaults to 'unique_id'. | 'unique_id' `target_col` | [str](#str) | Column that contains the target. Defaults to 'y'. | 'y' +`cutoff_col` | [str](#str) | Column that identifies the cutoff point for each forecast cross-validation fold. Defaults to 'cutoff'. | 'cutoff' **Returns:** Type | Description ---- | ----------- -[DFType](#utilsforecast.compat.DFType) | pandas or polars DataFrame: dataframe with one row per id and one column per model. +[IntoDataFrameT](#narwhals.stable.v2.typing.IntoDataFrameT) | pandas or polars DataFrame: dataframe with one row per id and one column per model. """ From 65dbd53585649d79bddf215147769a00668d9216 Mon Sep 17 00:00:00 2001 From: Saul Date: Thu, 4 Dec 2025 17:20:24 -0600 Subject: [PATCH 07/13] Updates installation to github --- pyproject.toml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b5b8bdf..41723d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "mkdocstrings-parser" version = "0.0.1" description = "A simple parser for mkdocstrings signature blocks" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [ "griffe2md<1.3", "pip-licenses>=4.5.1", @@ -21,14 +21,14 @@ dev = [ "pytest-cov", ] nixtlaverse = [ - "coreforecast", - "utilsforecast", - "datasetsforecast", - "mlforecast[dask]", - "hierarchicalforecast", - "neuralforecast", - "statsforecast", - "nixtla" + "coreforecast@git+https://github.com/Nixtla/coreforecast.git", + "utilsforecast@git+https://github.com/Nixtla/utilsforecast.git", + "datasetsforecast@git+https://github.com/Nixtla/datasetsforecast.git", + "mlforecast[dask]@git+https://github.com/Nixtla/mlforecast.git", + "hierarchicalforecast@git+https://github.com/Nixtla/hierarchicalforecast.git", + "neuralforecast@git+https://github.com/Nixtla/neuralforecast.git", + "statsforecast@git+https://github.com/Nixtla/statsforecast.git", + "nixtla@git+https://github.com/Nixtla/nixtla.git" ] optional = ["pandas"] From 1948ad721e864871d632c135c051854aa38bd78a Mon Sep 17 00:00:00 2001 From: Saul Date: Thu, 4 Dec 2025 17:20:40 -0600 Subject: [PATCH 08/13] Updates datasetsforecast testing --- tests/test_datasetsforecast.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/test_datasetsforecast.py b/tests/test_datasetsforecast.py index 367febc..f6387f2 100644 --- a/tests/test_datasetsforecast.py +++ b/tests/test_datasetsforecast.py @@ -51,13 +51,7 @@ def test_yearly_dataclass(setup_parser): @pytest.mark.datasets def test_download_file(setup_parser): - fn = """::: datasetsforecast.utils.download_file - handler: python - options: - docstring_style: numpy - heading_level: 3 - show_root_heading: true - show_source: true""" + fn = "::: datasetsforecast.utils.download_file" rendered = setup_parser.process_markdown(fn) assert rendered == """### `download_file` @@ -72,7 +66,7 @@ def test_download_file(setup_parser): Name | Type | Description | Default ---- | ---- | ----------- | ------- -`directory` | [str](#str) | Custom directory where data will be downloaded. | *required* +`directory` | ([str](#str), [Path](#pathlib.Path)) | Custom directory where data will be downloaded. | *required* `source_url` | [str](#str) | URL where data is hosted. | *required* `decompress` | [bool](#bool) | Wheter decompress downloaded file. Default False. | False """ \ No newline at end of file From 9366b1323ba8e2322334bfd75571d129962ceba5 Mon Sep 17 00:00:00 2001 From: Saul Date: Thu, 4 Dec 2025 18:00:26 -0600 Subject: [PATCH 09/13] Adds regular installation of mlforecast --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 41723d9..0fb9091 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,12 +19,14 @@ dependencies = [ dev = [ "pytest", "pytest-cov", + "lightgbm<4.6" ] nixtlaverse = [ "coreforecast@git+https://github.com/Nixtla/coreforecast.git", "utilsforecast@git+https://github.com/Nixtla/utilsforecast.git", "datasetsforecast@git+https://github.com/Nixtla/datasetsforecast.git", "mlforecast[dask]@git+https://github.com/Nixtla/mlforecast.git", + "mlforecast@git+https://github.com/Nixtla/mlforecast.git", "hierarchicalforecast@git+https://github.com/Nixtla/hierarchicalforecast.git", "neuralforecast@git+https://github.com/Nixtla/neuralforecast.git", "statsforecast@git+https://github.com/Nixtla/statsforecast.git", From 9685345803e9fa2eb9ee96e84d70c469849144df Mon Sep 17 00:00:00 2001 From: Saul Caballero Date: Wed, 10 Dec 2025 10:43:07 -0600 Subject: [PATCH 10/13] Updates solution to handle underscores --- mkdocstrings_parser/parser.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mkdocstrings_parser/parser.py b/mkdocstrings_parser/parser.py index a2d3d73..e1ed709 100644 --- a/mkdocstrings_parser/parser.py +++ b/mkdocstrings_parser/parser.py @@ -135,10 +135,16 @@ def generate_documentation(self, module_path: str, options: Dict[str, Any]) -> s markdown_docs = render_object_docs(obj, config) # type: ignore markdown_docs = markdown_docs.replace(f"### `{to_replace}.", "### `") - # Fix double backslashes in inline/block math equations + # Fix double backslashes in inline math equations markdown_docs = re.sub( r"\$([^$]+)\$", - lambda m: "$" + m.group(1).replace('\\\\', '\\') + "$", + lambda m: "$" + m.group(1).replace("\\\\", "\\") + "$", + markdown_docs + ) + # Fix underscores in inline math equations + markdown_docs = re.sub( + r"\$([^$]+)\$", + lambda m: "$" + m.group(1).replace("\\\_", "_") + "$", markdown_docs ) From 4f19761a32708e6df405416f163b46f748b74ae0 Mon Sep 17 00:00:00 2001 From: Saul Caballero Date: Wed, 10 Dec 2025 11:07:42 -0600 Subject: [PATCH 11/13] Updates parser for undescore solve --- mkdocstrings_parser/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocstrings_parser/parser.py b/mkdocstrings_parser/parser.py index e1ed709..975a938 100644 --- a/mkdocstrings_parser/parser.py +++ b/mkdocstrings_parser/parser.py @@ -144,7 +144,7 @@ def generate_documentation(self, module_path: str, options: Dict[str, Any]) -> s # Fix underscores in inline math equations markdown_docs = re.sub( r"\$([^$]+)\$", - lambda m: "$" + m.group(1).replace("\\\_", "_") + "$", + lambda m: "$" + m.group(1).replace("\_", "_") + "$", markdown_docs ) From 32846acefbdaeaae98cba916b1e2cbcc578cc526 Mon Sep 17 00:00:00 2001 From: Saul Caballero Date: Wed, 10 Dec 2025 11:08:30 -0600 Subject: [PATCH 12/13] Updates TopDown test --- tests/test_hierarchicalforecast.py | 49 +++++++++++++++--------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/tests/test_hierarchicalforecast.py b/tests/test_hierarchicalforecast.py index aa9173a..b752959 100644 --- a/tests/test_hierarchicalforecast.py +++ b/tests/test_hierarchicalforecast.py @@ -263,10 +263,12 @@ def test_topdown(setup_parser): Top Down Reconciliation Class. The Top Down hierarchical reconciliation method, distributes the total aggregate predictions and decomposes -it down the hierarchy using proportions $\mathbf{p}\_{\mathrm{[b]}}$ that can be actual historical values +it down the hierarchy using proportions $\mathbf{p}_{\mathrm{[b]}}$ that can be actual historical values or estimated. -$$\mathbf{P}=\[\mathbf{p}_{\mathrm{[b]}};|;\mathbf{0}_{\mathrm{[b][a,b;-1]}}\]$$ +```math +\mathbf{P}=[\mathbf{p}_{\mathrm{[b]}}\;|\;\mathbf{0}_{\mathrm{[b][a,b\;-1]}}] +``` **Parameters:** @@ -274,14 +276,11 @@ def test_topdown(setup_parser): ---- | ---- | ----------- | ------- `method` | [str](#str) | One of `forecast_proportions`, `average_proportions` and `proportion_averages`. | *required* -
-References +References: - [CW. Gross (1990). "Disaggregation methods to expedite product line forecasting". Journal of Forecasting, 9 , 233-254. doi:10.1002/for.3980090304](https://onlinelibrary.wiley.com/doi/abs/10.1002/for.3980090304). - [G. Fliedner (1999). "An investigation of aggregate variable time series forecast strategies with specific subaggregate time series statistical correlation". Computers and Operations Research, 26 , 1133-1149. doi:10.1016/S0305-0548(99)00017-9](). -
- #### `TopDown.fit` ```python @@ -294,22 +293,22 @@ def test_topdown(setup_parser): Name | Type | Description | Default ---- | ---- | ----------- | ------- -`S` | | Summing matrix of size (`base`, `bottom`). | *required* -`y_hat` | | Forecast values of size (`base`, `horizon`). | *required* +`S` | [ndarray](#numpy.ndarray) | Summing matrix of size (`base`, `bottom`). | *required* +`y_hat` | [ndarray](#numpy.ndarray) | Forecast values of size (`base`, `horizon`). | *required* `y_insample` | [ndarray](#numpy.ndarray) | Insample values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. | *required* -`y_hat_insample` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Insample forecast values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. | None -`sigmah` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Estimated standard deviation of the conditional marginal distribution. | None -`interval_method` | | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`. | *required* -`num_samples` | [Optional](#typing.Optional)\[[int](#int)\] | Number of samples for probabilistic coherent distribution. | None -`seed` | [Optional](#typing.Optional)\[[int](#int)\] | Seed for reproducibility. | None -`tags` | [Optional](#typing.Optional)\[[dict](#dict)\[[str](#str), [ndarray](#numpy.ndarray)\]\] | Each key is a level and each value its `S` indices. | None -`idx_bottom` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Indices corresponding to the bottom level of `S`, size (`bottom`). | None +`y_hat_insample` | [ndarray](#numpy.ndarray) | Insample forecast values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. | None +`sigmah` | [ndarray](#numpy.ndarray) | Estimated standard deviation of the conditional marginal distribution. | None +`interval_method` | [str](#str) | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`. | *required* +`num_samples` | [int](#int) | Number of samples for probabilistic coherent distribution. | None +`seed` | [int](#int) | Seed for reproducibility. | None +`tags` | [dict](#dict)\[[str](#str), [ndarray](#numpy.ndarray)\] | Each key is a level and each value its `S` indices. | None +`idx_bottom` | [ndarray](#numpy.ndarray) | Indices corresponding to the bottom level of `S`, size (`bottom`). | None **Returns:** Name | Type | Description ---- | ---- | ----------- -`self` | | object, fitted reconciler. +`TopDown` | [object](#object) | fitted reconciler. #### `TopDown.fit_predict` @@ -326,18 +325,18 @@ def test_topdown(setup_parser): `S` | [ndarray](#numpy.ndarray) | Summing matrix of size (`base`, `bottom`). | *required* `y_hat` | [ndarray](#numpy.ndarray) | Forecast values of size (`base`, `horizon`). | *required* `tags` | [dict](#dict)\[[str](#str), [ndarray](#numpy.ndarray)\] | Each key is a level and each value its `S` indices. | *required* -`idx_bottom` | [ndarray](#numpy.ndarray) | Indices corresponding to the bottom level of `S`, size (`bottom`). | None -`y_insample` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Insample values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. | None -`y_hat_insample` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Insample forecast values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. | None -`sigmah` | [Optional](#typing.Optional)\[[ndarray](#numpy.ndarray)\] | Estimated standard deviation of the conditional marginal distribution. | None -`level` | [Optional](#typing.Optional)\[[list](#list)\[[int](#int)\]\] | float list 0-100, confidence levels for prediction intervals. | None -`intervals_method` | [Optional](#typing.Optional)\[[str](#str)\] | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`. | None -`num_samples` | [Optional](#typing.Optional)\[[int](#int)\] | Number of samples for probabilistic coherent distribution. | None -`seed` | [Optional](#typing.Optional)\[[int](#int)\] | Seed for reproducibility. | None +`idx_bottom` | [ndarray](#numpy.ndarray) | Indices corresponding to the bottom level of `S`, size (`bottom`). Default is None. | None +`y_insample` | [ndarray](#numpy.ndarray) | Insample values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. Default is None. | None +`y_hat_insample` | [ndarray](#numpy.ndarray) | Insample forecast values of size (`base`, `insample_size`). Optional for `forecast_proportions` method. Default is None. | None +`sigmah` | [ndarray](#numpy.ndarray) | Estimated standard deviation of the conditional marginal distribution. Default is None. | None +`level` | [list](#list)\[[int](#int)\] | float list 0-100, confidence levels for prediction intervals. Default is None. | None +`intervals_method` | [str](#str) | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`. Default is None. | None +`num_samples` | [int](#int) | Number of samples for probabilistic coherent distribution. Default is None. | None +`seed` | [int](#int) | Seed for reproducibility. | None **Returns:** Name | Type | Description ---- | ---- | ----------- -`y_tilde` | | Reconciliated y_hat using the Top Down approach. +`y_tilde` | [ndarray](#numpy.ndarray) | Reconciliated y_hat using the Top Down approach. """ From 031fef0da293b07da4d399b5ca943cd00db4d4c1 Mon Sep 17 00:00:00 2001 From: Saul Caballero Date: Wed, 10 Dec 2025 11:56:48 -0600 Subject: [PATCH 13/13] Updates griffe2md version --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0fb9091..1b711cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ description = "A simple parser for mkdocstrings signature blocks" readme = "README.md" requires-python = ">=3.9" dependencies = [ - "griffe2md<1.3", + "griffe2md", "pip-licenses>=4.5.1", "pyyaml", "rich", @@ -27,7 +27,7 @@ nixtlaverse = [ "datasetsforecast@git+https://github.com/Nixtla/datasetsforecast.git", "mlforecast[dask]@git+https://github.com/Nixtla/mlforecast.git", "mlforecast@git+https://github.com/Nixtla/mlforecast.git", - "hierarchicalforecast@git+https://github.com/Nixtla/hierarchicalforecast.git", + "hierarchicalforecast@git+https://github.com/Nixtla/hierarchicalforecast.git@fix/docs", "neuralforecast@git+https://github.com/Nixtla/neuralforecast.git", "statsforecast@git+https://github.com/Nixtla/statsforecast.git", "nixtla@git+https://github.com/Nixtla/nixtla.git"