diff --git a/nbs/losses.ipynb b/nbs/losses.ipynb index 04ee830..ac0675c 100644 --- a/nbs/losses.ipynb +++ b/nbs/losses.ipynb @@ -1900,7 +1900,7 @@ " difference between predicted quantiles and observed values.\n", "\n", " The limit behavior of MQL allows to measure the accuracy \n", - " of a full predictive distribution $\\mathbf{\\hat{F}}_{\\\\tau}$ with \n", + " of a full predictive distribution with \n", " the continuous ranked probability score (CRPS). This can be achieved \n", " through a numerical integration technique, that discretizes the quantiles \n", " and treats the CRPS integral with a left Riemann approximation, averaging over \n", diff --git a/nbs/plotting.ipynb b/nbs/plotting.ipynb index 6ec2cf6..a8821d5 100644 --- a/nbs/plotting.ipynb +++ b/nbs/plotting.ipynb @@ -81,7 +81,7 @@ "):\n", " out_cols = [id_col, time_col]\n", " if models is not None:\n", - " models_pat = r'|'.join(models).replace('(', '\\(').replace(')', '\\)')\n", + " models_pat = r'|'.join(models).replace(r'(', r'\\(').replace(r')', r'\\)')\n", " interval_cols = [c for c in df.columns if re.search(rf\"^({models_pat})-(?:lo|hi)-\\d+\", c)]\n", " out_cols.extend(models + interval_cols)\n", " mask = ufp.is_in(df[id_col], uids)\n", diff --git a/utilsforecast/losses.py b/utilsforecast/losses.py index fce47ca..660c303 100644 --- a/utilsforecast/losses.py +++ b/utilsforecast/losses.py @@ -545,7 +545,7 @@ def mqloss( difference between predicted quantiles and observed values. The limit behavior of MQL allows to measure the accuracy - of a full predictive distribution $\mathbf{\hat{F}}_{\\tau}$ with + of a full predictive distribution with the continuous ranked probability score (CRPS). This can be achieved through a numerical integration technique, that discretizes the quantiles and treats the CRPS integral with a left Riemann approximation, averaging over diff --git a/utilsforecast/plotting.py b/utilsforecast/plotting.py index 0fa7f9f..12f8f60 100644 --- a/utilsforecast/plotting.py +++ b/utilsforecast/plotting.py @@ -31,7 +31,7 @@ def _filter_series(df, id_col, time_col, uids, models=None, max_insample_length=None): out_cols = [id_col, time_col] if models is not None: - models_pat = r"|".join(models).replace("(", "\(").replace(")", "\)") + models_pat = r"|".join(models).replace(r"(", r"\(").replace(r")", r"\)") interval_cols = [ c for c in df.columns if re.search(rf"^({models_pat})-(?:lo|hi)-\d+", c) ]