Skip to content

Commit

Permalink
fix: invalid escape sequence in string (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez authored Nov 26, 2024
1 parent 4bb140b commit 05d7947
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nbs/losses.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion nbs/plotting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion utilsforecast/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utilsforecast/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
]
Expand Down

0 comments on commit 05d7947

Please sign in to comment.