class_docstr: NeuralProphet forecaster.
  
  A simple yet powerful forecaster that models:
  Trend, seasonality, events, holidays, auto-regression, lagged covariates, and future-known regressors.
  Can be regularized and configured to model nonlinear relationships.
  
  Parameters
  ----------
      COMMENT
      Trend Config
      COMMENT
      growth : {'off' or 'linear'}, default 'linear'
          Set use of trend growth type.
  
          Options:
              * ``off``: no trend.
              * (default) ``linear``: fits a piece-wise linear trend with ``n_changepoints + 1`` segments
              * ``discontinuous``: For advanced users only - not a conventional trend,
              allows arbitrary jumps at each trend changepoint
  
      changepoints : {list of str, list of np.datetimes or np.array of np.datetimes}, optional
          Manually set dates at which to include potential changepoints.
  
          Note
          ----
          Does not accept ``np.array`` of ``np.str``. If not specified, potential changepoints are selected
          automatically.
  
      n_changepoints : int
          Number of potential trend changepoints to include.
  
          Note
          ----
          Changepoints are selected uniformly from the first ``changepoint_range`` proportion of the history.
          Ignored if manual ``changepoints`` list is supplied.
      changepoints_range : float
          Proportion of history in which trend changepoints will be estimated.
  
          e.g. set to 0.8 to allow changepoints only in the first 80% of training data.
          Ignored if  manual ``changepoints`` list is supplied.
      trend_reg : float, optional
          Parameter modulating the flexibility of the automatic changepoint selection.
  
          Note
          ----
          Large values (~1-100) will limit the variability of changepoints.
          Small values (~0.001-1.0) will allow changepoints to change faster.
          default: 0 will fully fit a trend to each segment.
  
      trend_reg_threshold : bool, optional
          Allowance for trend to change without regularization.
  
          Options
              * ``True``: Automatically set to a value that leads to a smooth trend.
              * (default) ``False``: All changes in changepoints are regularized
  
      trend_global_local : str, default 'global'
          Modelling strategy of the trend when multiple time series are present.
  
          Options:
              * ``global``: All the elements are modelled with the same trend.
              * ``local``: Each element is modelled with a different trend.
  
          Note
          ----
          When only one time series is input, this parameter should not be provided.
          Internally it will be set to ``global``, meaning that all the elements(only one in this case)
          are modelled with the same trend.
  
      COMMENT
      Seasonality Config
      COMMENT
      yearly_seasonality : bool, int
          Fit yearly seasonality.
  
          Options
              * ``True`` or ``False``
              * ``auto``: set automatically
              * ``value``: number of Fourier/linear terms to generate
      weekly_seasonality : bool, int
          Fit monthly seasonality.
  
          Options
              * ``True`` or ``False``
              * ``auto``: set automatically
              * ``value``: number of Fourier/linear terms to generate
      daily_seasonality : bool, int
          Fit daily seasonality.
  
          Options
              * ``True`` or ``False``
              * ``auto``: set automatically
              * ``value``: number of Fourier/linear terms to generate
      seasonality_mode : str
          Specifies mode of seasonality
  
          Options
              * (default) ``additive``
              * ``multiplicative``
      seasonality_reg : float, optional
          Parameter modulating the strength of the seasonality model.
  
          Note
          ----
          Smaller values (~0.1-1) allow the model to fit larger seasonal fluctuations,
          larger values (~1-100) dampen the seasonality.
          default: None, no regularization
      season_global_local : str, default 'global'
          Modelling strategy of the seasonality when multiple time series are present.
          Options:
              * ``global``: All the elements are modelled with the same seasonality.
              * ``local``: Each element is modelled with a different seasonality.
          Note
          ----
          When only one time series is input, this parameter should not be provided.
          Internally it will be set to ``global``, meaning that all the elements(only one in this case)
          are modelled with the same seasonality.
  
      COMMENT
      AR Config
      COMMENT
      n_lags : int
          Previous time series steps to include in auto-regression. Aka AR-order
      ar_reg : float, optional
          how much sparsity to induce in the AR-coefficients
  
          Note
          ----
          Large values (~1-100) will limit the number of nonzero coefficients dramatically.
          Small values (~0.001-1.0) will allow more non-zero coefficients.
          default: 0 no regularization of coefficients.
      ar_layers : list of int, optional
          array of hidden layer dimensions of the AR-Net. Specifies number of hidden layers (number of entries)
          and layer dimension (list entry).
  
      COMMENT
      Model Config
      COMMENT
      n_forecasts : int
          Number of steps ahead of prediction time step to forecast.
      lagged_reg_layers : list of int, optional
          array of hidden layer dimensions of the Covar-Net. Specifies number of hidden layers (number of entries)
          and layer dimension (list entry).
  
      COMMENT
      Train Config
      COMMENT
      learning_rate : float
          Maximum learning rate setting for 1cycle policy scheduler.
  
          Note
          ----
          Default ``None``: Automatically sets the ``learning_rate`` based on a learning rate range test.
          For manual user input, (try values ~0.001-10).
      epochs : int
          Number of epochs (complete iterations over dataset) to train model.
  
          Note
          ----
          Default ``None``: Automatically sets the number of epochs based on dataset size.
          For best results also leave batch_size to None. For manual values, try ~5-500.
      batch_size : int
          Number of samples per mini-batch.
  
          If not provided, ``batch_size`` is approximated based on dataset size.
          For manual values, try ~8-1024.
          For best results also leave ``epochs`` to ``None``.
      newer_samples_weight: float, default 2.0
          Sets factor by which the model fit is skewed towards more recent observations.
  
          Controls the factor by which final samples are weighted more compared to initial samples.
          Applies a positional weighting to each sample's loss value.
  
          e.g. ``newer_samples_weight = 2``: final samples are weighted twice as much as initial samples.
      newer_samples_start: float, default 0.0
          Sets beginning of 'newer' samples as fraction of training data.
  
          Throughout the range of 'newer' samples, the weight is increased
          from ``1.0/newer_samples_weight`` initially to 1.0 at the end,
          in a monotonously increasing function (cosine from pi to 2*pi).
      loss_func : str, torch.nn.functional.loss
          Type of loss to use:
  
          Options
              * (default) ``SmoothL1Loss``: SmoothL1 loss function
              * ``MSE``: Mean Squared Error loss function
              * ``MAE``: Mean Absolute Error loss function
              * ``torch.nn.functional.loss.``: loss or callable for custom loss, eg. L1-Loss
  
          Examples
          --------
          >>> from neuralprophet import NeuralProphet
          >>> import torch
          >>> import torch.nn as nn
          >>> m = NeuralProphet(loss_func=torch.nn.L1Loss)
  
      collect_metrics : list of str, dict, bool
          Set metrics to compute.
  
          Options
              * (default) ``True``: [``mae``, ``rmse``]
              * ``False``: No metrics
              * ``list``:  Valid options: [``mae``, ``rmse``, ``mse``]
              * ``dict``:  Collection of names of torchmetrics.Metric objects
  
          Examples
          --------
          >>> from neuralprophet import NeuralProphet
          >>> # computer MSE, MAE and RMSE
          >>> m = NeuralProphet(collect_metrics=["MSE", "MAE", "RMSE"])
          >>> # use custorm torchmetrics names
          >>> m = NeuralProphet(collect_metrics={"MAPE": "MeanAbsolutePercentageError", "MSLE": "MeanSquaredLogError",
  
      COMMENT
      Uncertainty Estimation
      COMMENT
      quantiles : list, default None
          A list of float values between (0, 1) which indicate the set of quantiles to be estimated.
  
      COMMENT
      Missing Data
      COMMENT
      impute_missing : bool
          whether to automatically impute missing dates/values
  
          Note
          ----
          imputation follows a linear method up to 20 missing values, more are filled with trend.
      impute_linear : int
          maximal number of missing dates/values to be imputed linearly (default: ``10``)
      impute_rolling : int
          maximal number of missing dates/values to be imputed
          using rolling average (default: ``10``)
      drop_missing : bool
          whether to automatically drop missing samples from the data
  
          Options
              * (default) ``False``: Samples containing NaN values are not dropped.
              * ``True``: Any sample containing at least one NaN value will be dropped.
  
      COMMENT
      Data Normalization
      COMMENT
      normalize : str
          Type of normalization to apply to the time series.
  
          Options
              * ``off`` bypasses data normalization
              * (default, binary timeseries) ``minmax`` scales the minimum value to 0.0 and the maximum value to 1.0
              * ``standardize`` zero-centers and divides by the standard deviation
              * (default) ``soft`` scales the minimum value to 0.0 and the 95th quantile to 1.0
              * ``soft1`` scales the minimum value to 0.1 and the 90th quantile to 0.9
      global_normalization : bool
          Activation of global normalization
  
          Options
              * ``True``: dict of dataframes is used as global_time_normalization
              * (default) ``False``: local normalization
      global_time_normalization : bool
          Specifies global time normalization
  
          Options
              * (default) ``True``: only valid in case of global modeling local normalization
              * ``False``: set time data_params locally
      unknown_data_normalization : bool
          Specifies unknown data normalization
  
          Options
              * ``True``: test data is normalized with global data params even if trained with local data params
              (global modeling with local normalization)
              * (default) ``False``: no global modeling with local normalization
      accelerator: str
          Name of accelerator from pytorch_lightning.accelerators to use for training. Use "auto" to automatically
          select an available accelerator.
          Provide `None` to deactivate the use of accelerators.
      trainer_config: dict
          Dictionary of additional trainer configuration parameters.
      prediction_frequency: dict
          periodic interval in which forecasts should be made.
          More than one item only allowed for {"daily-hour": x, "weekly-day": y"} to forecast on a specific hour of a
          specific day of week.
  
          Key: str
              periodicity of the predictions to be made.
          value: int
              forecast origin of the predictions to be made, e.g. 7 for 7am in case of 'daily-hour'.
  
          Options
              * ``'hourly-minute'``: forecast once per hour at a specified minute
              * ``'daily-hour'``: forecast once per day at a specified hour
              * ``'weekly-day'``: forecast once per week at a specified day
              * ``'monthly-day'``: forecast once per month at a specified day
              * ``'yearly-month'``: forecast once per year at a specified month
class_docstr_tok: ["NeuralProphet","forecaster",".","A","simple","yet","powerful","forecaster","that","models",":","Trend",",","seasonality",",","events",",","holidays",",","auto-regression",",","lagged","covariates",",","and","future-known","regressors",".","Can","be","regularized","and","configured","to","model","nonlinear","relationships",".","Parameters","--","--","--","--","--","COMMENT","Trend","Config","COMMENT","growth",":","{","'off","'","or","'linear","'","}",",","default","'linear'","Set","use","of","trend","growth","type",".","Options",":","*","``","off","``",":","no","trend",".","*","(","default",")","``","linear","``",":","fits","a","piece-wise","linear","trend","with","``","n_changepoints","+","1","``","segments","*","``","discontinuous","``",":","For","advanced","users","only","-","not","a","conventional","trend",",","allows","arbitrary","jumps","at","each","trend","changepoint","changepoints",":","{","list","of","str",",","list","of","np.datetimes","or","np.array","of","np.datetimes","}",",","optional","Manually","set","dates","at","which","to","include","potential","changepoints",".","Note","--","--","Does","not","accept","``","np.array","``","of","``","np.str","``",".","If","not","specified",",","potential","changepoints","are","selected","automatically",".","n_changepoints",":","int","Number","of","potential","trend","changepoints","to","include",".","Note","--","--","Changepoints","are","selected","uniformly","from","the","first","``","changepoint_range","``","proportion","of","the","history",".","Ignored","if","manual","``","changepoints","``","list","is","supplied",".","changepoints_range",":","float","Proportion","of","history","in","which","trend","changepoints","will","be","estimated",".","e.g",".","set","to","0.8","to","allow","changepoints","only","in","the","first","80","%","of","training","data",".","Ignored","if","manual","``","changepoints","``","list","is","supplied",".","trend_reg",":","float",",","optional","Parameter","modulating","the","flexibility","of","the","automatic","changepoint","selection",".","Note","--","--","Large","values","(","~1-100",")","will","limit","the","variability","of","changepoints",".","Small","values","(","~0.001-1.0",")","will","allow","changepoints","to","change","faster",".","default",":","0","will","fully","fit","a","trend","to","each","segment",".","trend_reg_threshold",":","bool",",","optional","Allowance","for","trend","to","change","without","regularization",".","Options","*","``","True","``",":","Automatically","set","to","a","value","that","leads","to","a","smooth","trend",".","*","(","default",")","``","False","``",":","All","changes","in","changepoints","are","regularized","trend_global_local",":","str",",","default","'global'","Modelling","strategy","of","the","trend","when","multiple","time","series","are","present",".","Options",":","*","``","global","``",":","All","the","elements","are","modelled","with","the","same","trend",".","*","``","local","``",":","Each","element","is","modelled","with","a","different","trend",".","Note","--","--","When","only","one","time","series","is","input",",","this","parameter","should","not","be","provided",".","Internally","it","will","be","set","to","``","global","``",",","meaning","that","all","the","elements","(","only","one","in","this","case",")","are","modelled","with","the","same","trend",".","COMMENT","Seasonality","Config","COMMENT","yearly_seasonality",":","bool",",","int","Fit","yearly","seasonality",".","Options","*","``","True","``","or","``","False","``","*","``","auto","``",":","set","automatically","*","``","value","``",":","number","of","Fourier\/linear","terms","to","generate","weekly_seasonality",":","bool",",","int","Fit","monthly","seasonality",".","Options","*","``","True","``","or","``","False","``","*","``","auto","``",":","set","automatically","*","``","value","``",":","number","of","Fourier\/linear","terms","to","generate","daily_seasonality",":","bool",",","int","Fit","daily","seasonality",".","Options","*","``","True","``","or","``","False","``","*","``","auto","``",":","set","automatically","*","``","value","``",":","number","of","Fourier\/linear","terms","to","generate","seasonality_mode",":","str","Specifies","mode","of","seasonality","Options","*","(","default",")","``","additive","``","*","``","multiplicative","``","seasonality_reg",":","float",",","optional","Parameter","modulating","the","strength","of","the","seasonality","model",".","Note","--","--","Smaller","values","(","~0.1-1",")","allow","the","model","to","fit","larger","seasonal","fluctuations",",","larger","values","(","~1-100",")","dampen","the","seasonality",".","default",":","None",",","no","regularization","season_global_local",":","str",",","default","'global'","Modelling","strategy","of","the","seasonality","when","multiple","time","series","are","present",".","Options",":","*","``","global","``",":","All","the","elements","are","modelled","with","the","same","seasonality",".","*","``","local","``",":","Each","element","is","modelled","with","a","different","seasonality",".","Note","--","--","When","only","one","time","series","is","input",",","this","parameter","should","not","be","provided",".","Internally","it","will","be","set","to","``","global","``",",","meaning","that","all","the","elements","(","only","one","in","this","case",")","are","modelled","with","the","same","seasonality",".","COMMENT","AR","Config","COMMENT","n_lags",":","int","Previous","time","series","steps","to","include","in","auto-regression",".","Aka","AR-order","ar_reg",":","float",",","optional","how","much","sparsity","to","induce","in","the","AR-coefficients","Note","--","--","Large","values","(","~1-100",")","will","limit","the","number","of","nonzero","coefficients","dramatically",".","Small","values","(","~0.001-1.0",")","will","allow","more","non-zero","coefficients",".","default",":","0","no","regularization","of","coefficients",".","ar_layers",":","list","of","int",",","optional","array","of","hidden","layer","dimensions","of","the","AR-Net",".","Specifies","number","of","hidden","layers","(","number","of","entries",")","and","layer","dimension","(","list","entry",")",".","COMMENT","Model","Config","COMMENT","n_forecasts",":","int","Number","of","steps","ahead","of","prediction","time","step","to","forecast",".","lagged_reg_layers",":","list","of","int",",","optional","array","of","hidden","layer","dimensions","of","the","Covar-Net",".","Specifies","number","of","hidden","layers","(","number","of","entries",")","and","layer","dimension","(","list","entry",")",".","COMMENT","Train","Config","COMMENT","learning_rate",":","float","Maximum","learning","rate","setting","for","1cycle","policy","scheduler",".","Note","--","--","Default","``","None","``",":","Automatically","sets","the","``","learning_rate","``","based","on","a","learning","rate","range","test",".","For","manual","user","input",",","(","try","values","~0.001-10",")",".","epochs",":","int","Number","of","epochs","(","complete","iterations","over","dataset",")","to","train","model",".","Note","--","--","Default","``","None","``",":","Automatically","sets","the","number","of","epochs","based","on","dataset","size",".","For","best","results","also","leave","batch_size","to","None",".","For","manual","values",",","try","~5-500",".","batch_size",":","int","Number","of","samples","per","mini-batch",".","If","not","provided",",","``","batch_size","``","is","approximated","based","on","dataset","size",".","For","manual","values",",","try","~8-1024",".","For","best","results","also","leave","``","epochs","``","to","``","None","``",".","newer_samples_weight",":","float",",","default","2.0","Sets","factor","by","which","the","model","fit","is","skewed","towards","more","recent","observations",".","Controls","the","factor","by","which","final","samples","are","weighted","more","compared","to","initial","samples",".","Applies","a","positional","weighting","to","each","sample","'s","loss","value",".","e.g",".","``","newer_samples_weight","=","2","``",":","final","samples","are","weighted","twice","as","much","as","initial","samples",".","newer_samples_start",":","float",",","default","0.0","Sets","beginning","of","'newer","'","samples","as","fraction","of","training","data",".","Throughout","the","range","of","'newer","'","samples",",","the","weight","is","increased","from","``","1.0\/newer_samples_weight","``","initially","to","1.0","at","the","end",",","in","a","monotonously","increasing","function","(","cosine","from","pi","to","2","*","pi",")",".","loss_func",":","str",",","torch.nn.functional.loss","Type","of","loss","to","use",":","Options","*","(","default",")","``","SmoothL1Loss","``",":","SmoothL1","loss","function","*","``","MSE","``",":","Mean","Squared","Error","loss","function","*","``","MAE","``",":","Mean","Absolute","Error","loss","function","*","``","torch.nn.functional.loss.","``",":","loss","or","callable","for","custom","loss",",","eg",".","L1-Loss","Examples","--","--","--","--",">",">",">","from","neuralprophet","import","NeuralProphet",">",">",">","import","torch",">",">",">","import","torch.nn","as","nn",">",">",">","m","=","NeuralProphet","(","loss_func=torch.nn.L1Loss",")","collect_metrics",":","list","of","str",",","dict",",","bool","Set","metrics","to","compute",".","Options","*","(","default",")","``","True","``",":","[","``","mae","``",",","``","rmse","``","]","*","``","False","``",":","No","metrics","*","``","list","``",":","Valid","options",":","[","``","mae","``",",","``","rmse","``",",","``","mse","``","]","*","``","dict","``",":","Collection","of","names","of","torchmetrics.Metric","objects","Examples","--","--","--","--",">",">",">","from","neuralprophet","import","NeuralProphet",">",">",">","#","computer","MSE",",","MAE","and","RMSE",">",">",">","m","=","NeuralProphet","(","collect_metrics=","[","``","MSE","''",",","``","MAE","''",",","``","RMSE","''","]",")",">",">",">","#","use","custorm","torchmetrics","names",">",">",">","m","=","NeuralProphet","(","collect_metrics=","{","``","MAPE","''",":","``","MeanAbsolutePercentageError","''",",","``","MSLE","''",":","``","MeanSquaredLogError","''",",","COMMENT","Uncertainty","Estimation","COMMENT","quantiles",":","list",",","default","None","A","list","of","float","values","between","(","0",",","1",")","which","indicate","the","set","of","quantiles","to","be","estimated",".","COMMENT","Missing","Data","COMMENT","impute_missing",":","bool","whether","to","automatically","impute","missing","dates\/values","Note","--","--","imputation","follows","a","linear","method","up","to","20","missing","values",",","more","are","filled","with","trend",".","impute_linear",":","int","maximal","number","of","missing","dates\/values","to","be","imputed","linearly","(","default",":","``","10","``",")","impute_rolling",":","int","maximal","number","of","missing","dates\/values","to","be","imputed","using","rolling","average","(","default",":","``","10","``",")","drop_missing",":","bool","whether","to","automatically","drop","missing","samples","from","the","data","Options","*","(","default",")","``","False","``",":","Samples","containing","NaN","values","are","not","dropped",".","*","``","True","``",":","Any","sample","containing","at","least","one","NaN","value","will","be","dropped",".","COMMENT","Data","Normalization","COMMENT","normalize",":","str","Type","of","normalization","to","apply","to","the","time","series",".","Options","*","``","off","``","bypasses","data","normalization","*","(","default",",","binary","timeseries",")","``","minmax","``","scales","the","minimum","value","to","0.0","and","the","maximum","value","to","1.0","*","``","standardize","``","zero-centers","and","divides","by","the","standard","deviation","*","(","default",")","``","soft","``","scales","the","minimum","value","to","0.0","and","the","95th","quantile","to","1.0","*","``","soft1","``","scales","the","minimum","value","to","0.1","and","the","90th","quantile","to","0.9","global_normalization",":","bool","Activation","of","global","normalization","Options","*","``","True","``",":","dict","of","dataframes","is","used","as","global_time_normalization","*","(","default",")","``","False","``",":","local","normalization","global_time_normalization",":","bool","Specifies","global","time","normalization","Options","*","(","default",")","``","True","``",":","only","valid","in","case","of","global","modeling","local","normalization","*","``","False","``",":","set","time","data_params","locally","unknown_data_normalization",":","bool","Specifies","unknown","data","normalization","Options","*","``","True","``",":","test","data","is","normalized","with","global","data","params","even","if","trained","with","local","data","params","(","global","modeling","with","local","normalization",")","*","(","default",")","``","False","``",":","no","global","modeling","with","local","normalization","accelerator",":","str","Name","of","accelerator","from","pytorch_lightning.accelerators","to","use","for","training",".","Use","``","auto","''","to","automatically","select","an","available","accelerator",".","Provide","`","None","`","to","deactivate","the","use","of","accelerators",".","trainer_config",":","dict","Dictionary","of","additional","trainer","configuration","parameters",".","prediction_frequency",":","dict","periodic","interval","in","which","forecasts","should","be","made",".","More","than","one","item","only","allowed","for","{","``","daily-hour","''",":","x",",","``","weekly-day","''",":","y","''","}","to","forecast","on","a","specific","hour","of","a","specific","day","of","week",".","Key",":","str","periodicity","of","the","predictions","to","be","made",".","value",":","int","forecast","origin","of","the","predictions","to","be","made",",","e.g",".","7","for","7am","in","case","of","'daily-hour","'",".","Options","*","``","'hourly-minute","'","``",":","forecast","once","per","hour","at","a","specified","minute","*","``","'daily-hour","'","``",":","forecast","once","per","day","at","a","specified","hour","*","``","'weekly-day","'","``",":","forecast","once","per","week","at","a","specified","day","*","``","'monthly-day","'","``",":","forecast","once","per","month","at","a","specified","day","*","``","'yearly-month","'","``",":","forecast","once","per","year","at","a","specified","month"]
docstr: Apply a given conformal prediction technique to get the uncertainty prediction intervals (or q-hats).
  Then predict.
  
  Parameters
  ----------
      df : pd.DataFrame
          test dataframe containing column ``ds``, ``y``, and optionally ``ID`` with data
      calibration_df : pd.DataFrame
          holdout calibration dataframe for split conformal prediction
      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
              * (default) ``naive``: Naive or Absolute Residual
              * ``cqr``: Conformalized Quantile Regression
      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 backend 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.
      show_all_PI : bool
          whether to return all prediction intervals (including quantile regression and conformal prediction)
      kwargs : dict
          additional predict parameters for test df
  
  Returns
  -------
      pd.DataFrame, Optional[pd.DataFrame]
          test dataframe with the conformal prediction intervals and evaluation dataframe if evaluate set to True
docstr_tok: ["Apply","a","given","conformal","prediction","technique","to","get","the","uncertainty","prediction","intervals","(","or","q-hats",")",".","Then","predict",".","Parameters","--","--","--","--","--","df",":","pd.DataFrame","test","dataframe","containing","column","``","ds","``",",","``","y","``",",","and","optionally","``","ID","``","with","data","calibration_df",":","pd.DataFrame","holdout","calibration","dataframe","for","split","conformal","prediction","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","*","(","default",")","``","naive","``",":","Naive","or","Absolute","Residual","*","``","cqr","``",":","Conformalized","Quantile","Regression","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","backend","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",".","show_all_PI",":","bool","whether","to","return","all","prediction","intervals","(","including","quantile","regression","and","conformal","prediction",")","kwargs",":","dict","additional","predict","parameters","for","test","df","Returns","--","--","--","-","pd.DataFrame",",","Optional","[","pd.DataFrame","]","test","dataframe","with","the","conformal","prediction","intervals","and","evaluation","dataframe","if","evaluate","set","to","True"]
code: def conformal_predict(
      self,
      df: pd.DataFrame,
      calibration_df: pd.DataFrame,
      alpha: Union[float, Tuple[float, float]],
      method: str = "naive",
      plotting_backend: Optional[str] = None,
      show_all_PI: bool = False,
      **kwargs,
  ) -> pd.DataFrame:
      """Apply a given conformal prediction technique to get the uncertainty prediction intervals (or q-hats).
      Then predict.
  
      Parameters
      ----------
          df : pd.DataFrame
              test dataframe containing column ``ds``, ``y``, and optionally ``ID`` with data
          calibration_df : pd.DataFrame
              holdout calibration dataframe for split conformal prediction
          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
                  * (default) ``naive``: Naive or Absolute Residual
                  * ``cqr``: Conformalized Quantile Regression
          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 backend 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.
          show_all_PI : bool
              whether to return all prediction intervals (including quantile regression and conformal prediction)
          kwargs : dict
              additional predict parameters for test df
  
      Returns
      -------
          pd.DataFrame, Optional[pd.DataFrame]
              test dataframe with the conformal prediction intervals and evaluation dataframe if evaluate set to True
      """
      # get predictions for calibration dataframe
      df_cal = self.predict(calibration_df)
      # get predictions for test dataframe
      df_test = self.predict(df, **kwargs)
  
      # initiate Conformal instance
      c = Conformal(
          alpha=alpha,
          method=method,
          n_forecasts=self.n_forecasts,
          quantiles=self.config_train.quantiles,
      )
  
      df_forecast = c.predict(
          df=df_test, df_cal=df_cal, show_all_PI=show_all_PI
      )
  
      # plot one-sided prediction interval width with q
      if plotting_backend:
          c.plot(plotting_backend)
  
      return df_forecast
  
imports: import logging
  import os
  import time
  from collections import OrderedDict
  from typing import Callable, List, Optional, Tuple, Type, Union
  import matplotlib
  import numpy
  import pandas
  import pytorch_lightning
  import torch
  from matplotlib import pyplot
  from matplotlib.axes import Axes
  from torch.utils.data import DataLoader
  from neuralprophet import configure, df_utils, np_types, time_dataset, time_net, utils, utils_metrics
  from neuralprophet.data.process import _check_dataframe, _convert_raw_predictions_to_raw_df, _create_dataset, _handle_missing_data, _prepare_dataframe_to_predict, _reshape_raw_predictions_to_forecst_df, _validate_column_name
  from neuralprophet.data.split import _make_future_dataframe, _maybe_extend_df
  from neuralprophet.data.transform import _normalize
  from neuralprophet.logger import MetricsLogger
  from neuralprophet.plot_forecast_matplotlib import plot, plot_components
  from neuralprophet.plot_forecast_plotly import conformal_plot_plotly
  from neuralprophet.plot_forecast_plotly import plot
  from neuralprophet.plot_forecast_plotly import plot_components
  from neuralprophet.plot_model_parameters_matplotlib import plot_parameters
  from neuralprophet.plot_model_parameters_plotly import plot_parameters
  from neuralprophet.plot_utils import get_valid_configuration, log_warning_deprecation_plotly, select_plotting_backend
  from neuralprophet.uncertainty import Conformal
label_desc: Use image node_id 36 for calling the NeuralProphet obj's underlying member method code with example usage: obj.conformal_predict(df, calibration_df, alpha, method, plotting_backend, show_all_PI) and returns: df_forecast