Skip to content

Commit

Permalink
Backports for v0.11.1 (#2401)
Browse files Browse the repository at this point in the history
* Fix dominick dataset bug. (#2364)

* Remove strange quoting marks from docstrings (#2368)

* Change 'confidence interval' to 'prediction interval' (#2373)

* Proposed fix to zero seed bug. (#2379)

Co-authored-by: Sigrid Passano Hellan <[email protected]>

Co-authored-by: Bhaskar Dhariyal <[email protected]>
Co-authored-by: Nils Kiele <[email protected]>
Co-authored-by: Sigrid Passano Hellan <[email protected]>
Co-authored-by: Sigrid Passano Hellan <[email protected]>
  • Loading branch information
5 people authored Oct 28, 2022
1 parent a5ba84a commit ca6e4f2
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/getting_started/background.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ that there is probably a demand of say 50 dishes, but unlikely more than 60.
```{figure} ../_static/forecast-distributions.png
---
---
Predicting 24 hours, showing `p50`, `p90`, `p95`, `p98` confidence intervals.
Predicting 24 hours, showing `p50`, `p90`, `p95`, `p98` prediction intervals.
```

```{note}
Expand Down
2 changes: 1 addition & 1 deletion src/gluonts/dataset/repository/_tsf_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def default_prediction_length_from_frequency(freq: str) -> int:
"T": 60,
"H": 48,
"D": 30,
"W": 8,
"W-SUN": 8,
"M": 12,
"Y": 4,
}
Expand Down
2 changes: 1 addition & 1 deletion src/gluonts/evaluation/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class Evaluator:
for the given series frequency as returned by `get_seasonality`
alpha
Parameter of the MSIS metric from the M4 competition that
defines the confidence interval.
defines the prediction interval.
For alpha=0.05 (default) the 95% considered is considered in the
metric, see
https://www.m4.unic.ac.cy/wp-content/uploads/2018/03/M4-Competitors-Guide.pdf
Expand Down
6 changes: 3 additions & 3 deletions src/gluonts/model/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,14 @@ def plot(
**kwargs,
):
"""
Plots the median of the forecast as well as confidence bounds.
Plots the median of the forecast as well as prediction interval bounds
(requires matplotlib and pandas).
Parameters
----------
prediction_intervals : float or list of floats in [0, 100]
Confidence interval size(s). If a list, it will stack the error
plots for each confidence interval. Only relevant for error styles
Prediction interval size(s). If a list, it will stack the error
plots for each prediction interval. Only relevant for error styles
with "ci" in the name.
show_mean : boolean
Whether to also show the mean of the forecast.
Expand Down
2 changes: 1 addition & 1 deletion src/gluonts/model/naive_2/_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def seasonality_test(past_ts_data: np.array, season_length: int) -> bool:
Code based on:
https://github.com/Mcompetitions/M4-methods/blob/master/Benchmarks%20and%20Evaluation.R
"""
critical_z_score = 1.645 # corresponds to 90% confidence interval
critical_z_score = 1.645 # corresponds to 90% prediction interval
if len(past_ts_data) < 3 * season_length:
return False
else:
Expand Down
2 changes: 1 addition & 1 deletion src/gluonts/mx/model/n_beats/_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

class NBEATSEnsemblePredictor(Predictor):
"""
" An ensemble predictor for N-BEATS. Calling '.predict' will result in::
An ensemble predictor for N-BEATS. Calling '.predict' will result in::
|predictors|x|dataset|
Expand Down
2 changes: 1 addition & 1 deletion src/gluonts/mx/model/n_beats/_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def initialize_basis(self, F):

class NBEATSTrendBlock(NBEATSBlock):
"""
" The NBEATS Block as described in the paper:
The NBEATS Block as described in the paper:
https://arxiv.org/abs/1905.10437. This is the Trend block variant.
Parameters
Expand Down
4 changes: 2 additions & 2 deletions src/gluonts/mx/model/seq2seq/_mq_dnn_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MQCNNEstimator(ForkingSeq2SeqEstimator):
It makes sense to disable this, if you don't have ``feat_dynamic_real``
for the prediction range.
seed
Will set the specified int seed for numpy anc MXNet if specified.
Will set the specified int seed for numpy and MXNet if specified.
(default: None)
decoder_mlp_dim_seq
The dimensionalities of the Multi Layer Perceptron layers of the
Expand Down Expand Up @@ -217,7 +217,7 @@ def __init__(
f"{len(self.dilation_seq)} vs. {len(self.kernel_size_seq)}"
)

if seed:
if seed is not None:
np.random.seed(seed)
mx.random.seed(seed, trainer.ctx)

Expand Down
2 changes: 1 addition & 1 deletion src/gluonts/transform/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def transform(self, data: DataEntry):

class RemoveFields(SimpleTransformation):
"""
" Remove field names if present.
Remove field names if present.
Parameters
----------
Expand Down

0 comments on commit ca6e4f2

Please sign in to comment.