class_docstr: Conformal prediction dataclass
  
  Parameters
  ----------
  alpha : float or tuple
      user-specified significance level of the prediction interval, float if coverage error spread arbitrarily over
      left and right tails, tuple of two floats for different coverage error over left and right tails respectively
  method : str
      name of conformal prediction technique used
  
      Options
          * ``naive``: Naive or Absolute Residual
          * ``cqr``: Conformalized Quantile Regression
  n_forecasts : int
      optional, number of steps ahead of prediction time step to forecast
  quantiles : list
      optional, list of quantiles for quantile regression uncertainty estimate
class_docstr_tok: ["Conformal","prediction","dataclass","Parameters","--","--","--","--","--","alpha",":","float","or","tuple","user-specified","significance","level","of","the","prediction","interval",",","float","if","coverage","error","spread","arbitrarily","over","left","and","right","tails",",","tuple","of","two","floats","for","different","coverage","error","over","left","and","right","tails","respectively","method",":","str","name","of","conformal","prediction","technique","used","Options","*","``","naive","``",":","Naive","or","Absolute","Residual","*","``","cqr","``",":","Conformalized","Quantile","Regression","n_forecasts",":","int","optional",",","number","of","steps","ahead","of","prediction","time","step","to","forecast","quantiles",":","list","optional",",","list","of","quantiles","for","quantile","regression","uncertainty","estimate"]
docstr: Apply a given conformal prediction technique to get the uncertainty prediction intervals (or q-hats).
  
  Parameters
  ----------
      plotting_backend : str
          specifies the plotting backend for the nonconformity scores plot, if any
  
          Options
          * ``plotly-resampler``: Use the plotly backend for plotting in resample mode. This mode uses the
              plotly-resampler package to accelerate visualizing large data by resampling it. For some
              environments (colab, pycharm interpreter) plotly-resampler might not properly vizualise the figures.
              In this case, consider switching to 'plotly-auto'.
          * ``plotly``: Use the plotly backend for plotting
          * ``matplotlib``: use matplotlib for plotting
          * (default) None: Plotting backend ist set automatically. Use plotly with resampling for jupyterlab
              notebooks and vscode notebooks. Automatically switch to plotly without resampling for all other
              environments.
docstr_tok: ["Apply","a","given","conformal","prediction","technique","to","get","the","uncertainty","prediction","intervals","(","or","q-hats",")",".","Parameters","--","--","--","--","--","plotting_backend",":","str","specifies","the","plotting","backend","for","the","nonconformity","scores","plot",",","if","any","Options","*","``","plotly-resampler","``",":","Use","the","plotly","backend","for","plotting","in","resample","mode",".","This","mode","uses","the","plotly-resampler","package","to","accelerate","visualizing","large","data","by","resampling","it",".","For","some","environments","(","colab",",","pycharm","interpreter",")","plotly-resampler","might","not","properly","vizualise","the","figures",".","In","this","case",",","consider","switching","to","'plotly-auto","'",".","*","``","plotly","``",":","Use","the","plotly","backend","for","plotting","*","``","matplotlib","``",":","use","matplotlib","for","plotting","*","(","default",")","None",":","Plotting","backend","ist","set","automatically",".","Use","plotly","with","resampling","for","jupyterlab","notebooks","and","vscode","notebooks",".","Automatically","switch","to","plotly","without","resampling","for","all","other","environments","."]
code: def plot(self, plotting_backend=None):
      """Apply a given conformal prediction technique to get the uncertainty prediction intervals (or q-hats).
  
      Parameters
      ----------
          plotting_backend : str
              specifies the plotting backend for the nonconformity scores plot, if any
  
              Options
              * ``plotly-resampler``: Use the plotly backend for plotting in resample mode. This mode uses the
                  plotly-resampler package to accelerate visualizing large data by resampling it. For some
                  environments (colab, pycharm interpreter) plotly-resampler might not properly vizualise the figures.
                  In this case, consider switching to 'plotly-auto'.
              * ``plotly``: Use the plotly backend for plotting
              * ``matplotlib``: use matplotlib for plotting
              * (default) None: Plotting backend ist set automatically. Use plotly with resampling for jupyterlab
                  notebooks and vscode notebooks. Automatically switch to plotly without resampling for all other
                  environments.
  
      """
      method = (
          self.method.upper()
          if "cqr" in self.method.lower()
          else self.method.title()
      )
      # Check whether a local or global plotting backend is set.
      plotting_backend = select_plotting_backend(
          model=self, plotting_backend=plotting_backend
      )
  
      log_warning_deprecation_plotly(plotting_backend)
      initial_q_hat = (
          self.q_hats["q_hat_sym"][0]
          if self.symmetrical
          else [self.q_hats["q_hat_lo"][0], self.q_hats["q_hat_hi"][0]]
      )
      if plotting_backend.startswith("plotly"):
          if self.n_forecasts == 1:
              fig = plot_nonconformity_scores_plotly(
                  self.noncon_scores,
                  self.alpha,
                  initial_q_hat,
                  method,
                  resampler_active=plotting_backend
                  == "plotly-resampler",
              )
          else:
              fig = plot_interval_width_per_timestep_plotly(
                  self.q_hats, method, resampler_active=False
              )
          fig.show()
      else:
          if self.n_forecasts == 1:
              # includes nonconformity scores of the first timestep
              fig = plot_nonconformity_scores(
                  self.noncon_scores, self.alpha, initial_q_hat, method
              )
          else:
              fig = plot_interval_width_per_timestep(
                  self.q_hats, method
              )
      if (
          plotting_backend
          in ["matplotlib", "plotly", "plotly-resampler"]
          and matplotlib.is_interactive()
      ):
          fig
  
file_path: neural_prophet/neuralprophet/uncertainty.py
imports: import re
  from dataclasses import dataclass
  from typing import Any, List, Tuple, Union
  import matplotlib
  import numpy
  import pandas
  from neuralprophet.plot_forecast_matplotlib import plot_interval_width_per_timestep, plot_nonconformity_scores
  from neuralprophet.plot_forecast_plotly import plot_interval_width_per_timestep
  from neuralprophet.plot_forecast_plotly import plot_nonconformity_scores
  from neuralprophet.plot_utils import log_warning_deprecation_plotly, select_plotting_backend
label_desc: Use image node_id 5 for calling the Conformal obj's underlying member method code with example usage: obj.plot(plotting_backend) without return types