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: Splits timeseries data in k folds for crossvalidation.
  
  Parameters
  ----------
      df : pd.DataFrame
          dataframe containing column ``ds``, ``y``, and optionally``ID`` with all data
      freq : str
          data step sizes. Frequency of data recording,
  
          Note
          ----
          Any valid frequency for pd.date_range, such as ``5min``, ``D``, ``MS`` or ``auto`` (default) to
          automatically set frequency.
      k : int
          number of CV folds
      fold_pct : float
          percentage of overall samples to be in each fold
      fold_overlap_pct : float
          percentage of overlap between the validation folds.
      global_model_cv_type : str
          Type of crossvalidation to apply to the dict of time series.
  
              options:
  
                  ``global-time`` (default) crossvalidation is performed according to a timestamp threshold.
  
                  ``local`` each episode will be crossvalidated locally (may cause time leakage among different
                  episodes)
  
                  ``intersect`` only the time intersection of all the episodes will be considered. A considerable
                  amount of data may not be used. However, this approach guarantees an equal number of train/test
                  samples for each episode.
  
  Returns
  -------
      list of k tuples [(df_train, df_val), ...]
  
          training data
  
          validation data
  See Also
  --------
      split_df : Splits timeseries df into train and validation sets.
      double_crossvalidation_split_df : Splits timeseries data in two sets of k folds for crossvalidation on
      training and testing data.
  
  Examples
  --------
      >>> df1 = pd.DataFrame({'ds': pd.date_range(start = '2022-12-01', periods = 10, freq = 'D'),
      ...                     'y': [9.59, 8.52, 8.18, 8.07, 7.89, 8.09, 7.84, 7.65, 8.71, 8.09]})
      >>> df2 = pd.DataFrame({'ds': pd.date_range(start = '2022-12-02', periods = 10, freq = 'D'),
      ...                     'y': [8.71, 8.09, 7.84, 7.65, 8.02, 8.52, 8.18, 8.07, 8.25, 8.30]})
      >>> df3 = pd.DataFrame({'ds': pd.date_range(start = '2022-12-03', periods = 10, freq = 'D'),
      ...                     'y': [7.67, 7.64, 7.55, 8.25, 8.32, 9.59, 8.52, 7.55, 8.25, 8.09]})
      >>> df3
          ds              y
      0   2022-12-03      7.67
      1   2022-12-04      7.64
      2   2022-12-05      7.55
      3   2022-12-06      8.25
      4   2022-12-07      8.32
      5   2022-12-08      9.59
      6   2022-12-09      8.52
      7   2022-12-10      7.55
      8   2022-12-11      8.25
      9   2022-12-12      8.09
  
  You can create folds for a single dataframe.
      >>> folds = m.crossvalidation_split_df(df3, k = 2, fold_pct = 0.2)
      >>> folds
      [(  ds            y
          0 2022-12-03  7.67
          1 2022-12-04  7.64
          2 2022-12-05  7.55
          3 2022-12-06  8.25
          4 2022-12-07  8.32
          5 2022-12-08  9.59
          6 2022-12-09  8.52,
          ds            y
          0 2022-12-10  7.55
          1 2022-12-11  8.25),
      (   ds            y
          0 2022-12-03  7.67
          1 2022-12-04  7.64
          2 2022-12-05  7.55
          3 2022-12-06  8.25
          4 2022-12-07  8.32
          5 2022-12-08  9.59
          6 2022-12-09  8.52
          7 2022-12-10  7.55,
          ds            y
          0 2022-12-11  8.25
          1 2022-12-12  8.09)]
  
  We can also create a df with many IDs.
      >>> df1['ID'] = 'data1'
      >>> df2['ID'] = 'data2'
      >>> df3['ID'] = 'data3'
      >>> df = pd.concat((df1, df2, df3))
  
  When using the df with many IDs, there are three types of possible crossvalidation. The default crossvalidation
  is performed according to a timestamp threshold. In this case, we can have a different number of samples for
  each time series per fold. This approach prevents time leakage.
      >>> folds = m.crossvalidation_split_df(df, k = 2, fold_pct = 0.2)
  One can notice how each of the folds has a different number of samples for the validation set. Nonetheless,
  time leakage does not occur.
      >>> folds[0][1]
          ds      y       ID
      0   2022-12-10      8.09    data1
      1   2022-12-10      8.25    data2
      2   2022-12-11      8.30    data2
      3   2022-12-10      7.55    data3
      4   2022-12-11      8.25    data3
      >>> folds[1][1]
          ds      y       ID
      0   2022-12-11      8.30    data2
      1   2022-12-11      8.25    data3
      2   2022-12-12      8.09    data3
  In some applications, crossvalidating each of the time series locally may be more adequate.
      >>> folds = m.crossvalidation_split_df(df, k = 2, fold_pct = 0.2, global_model_cv_type = 'local')
  In this way, we prevent a different number of validation samples in each fold.
      >>> folds[0][1]
          ds      y       ID
      0   2022-12-08      7.65    data1
      1   2022-12-09      8.71    data1
      2   2022-12-09      8.07    data2
      3   2022-12-10      8.25    data2
      4   2022-12-10      7.55    data3
      5   2022-12-11      8.25    data3
      >>> folds[1][1]
          ds      y       ID
      0   2022-12-09      8.71    data1
      1   2022-12-10      8.09    data1
      2   2022-12-10      8.25    data2
      3   2022-12-11      8.30    data2
      4   2022-12-11      8.25    data3
      5   2022-12-12      8.09    data3
  The last type of global model crossvalidation gets the time intersection among all the time series used. There
  is no time leakage in this case, and we preserve the same number of samples per fold. The only drawback of this
  approach is that some of the samples may not be used (those not in the time intersection).
      >>> folds = m.crossvalidation_split_df(df, k = 2, fold_pct = 0.2, global_model_cv_type = 'intersect')
      >>> folds[0][1]
          ds      y       ID
      0   2022-12-09      8.71    data1
      1   2022-12-09      8.07    data2
      2   2022-12-09      8.52    data3
      0 2022-12-09  8.52}
      >>> folds[1][1]
          ds      y       ID
      0   2022-12-10      8.09    data1
      1   2022-12-10      8.25    data2
      2   2022-12-10      7.55    data3
code: def crossvalidation_split_df(
      self,
      df: pd.DataFrame,
      freq: str = "auto",
      k: int = 5,
      fold_pct: float = 0.1,
      fold_overlap_pct: float = 0.5,
      global_model_cv_type: str = "global-time",
  ):
      """Splits timeseries data in k folds for crossvalidation.
  
      Parameters
      ----------
          df : pd.DataFrame
              dataframe containing column ``ds``, ``y``, and optionally``ID`` with all data
          freq : str
              data step sizes. Frequency of data recording,
  
              Note
              ----
              Any valid frequency for pd.date_range, such as ``5min``, ``D``, ``MS`` or ``auto`` (default) to
              automatically set frequency.
          k : int
              number of CV folds
          fold_pct : float
              percentage of overall samples to be in each fold
          fold_overlap_pct : float
              percentage of overlap between the validation folds.
          global_model_cv_type : str
              Type of crossvalidation to apply to the dict of time series.
  
                  options:
  
                      ``global-time`` (default) crossvalidation is performed according to a timestamp threshold.
  
                      ``local`` each episode will be crossvalidated locally (may cause time leakage among different
                      episodes)
  
                      ``intersect`` only the time intersection of all the episodes will be considered. A considerable
                      amount of data may not be used. However, this approach guarantees an equal number of train/test
                      samples for each episode.
  
      Returns
      -------
          list of k tuples [(df_train, df_val), ...]
  
              training data
  
              validation data
      See Also
      --------
          split_df : Splits timeseries df into train and validation sets.
          double_crossvalidation_split_df : Splits timeseries data in two sets of k folds for crossvalidation on
          training and testing data.
  
      Examples
      --------
          >>> df1 = pd.DataFrame({'ds': pd.date_range(start = '2022-12-01', periods = 10, freq = 'D'),
          ...                     'y': [9.59, 8.52, 8.18, 8.07, 7.89, 8.09, 7.84, 7.65, 8.71, 8.09]})
          >>> df2 = pd.DataFrame({'ds': pd.date_range(start = '2022-12-02', periods = 10, freq = 'D'),
          ...                     'y': [8.71, 8.09, 7.84, 7.65, 8.02, 8.52, 8.18, 8.07, 8.25, 8.30]})
          >>> df3 = pd.DataFrame({'ds': pd.date_range(start = '2022-12-03', periods = 10, freq = 'D'),
          ...                     'y': [7.67, 7.64, 7.55, 8.25, 8.32, 9.59, 8.52, 7.55, 8.25, 8.09]})
          >>> df3
              ds	        y
          0	2022-12-03	7.67
          1	2022-12-04	7.64
          2	2022-12-05	7.55
          3	2022-12-06	8.25
          4	2022-12-07	8.32
          5	2022-12-08	9.59
          6	2022-12-09	8.52
          7	2022-12-10	7.55
          8	2022-12-11	8.25
          9	2022-12-12	8.09
  
      You can create folds for a single dataframe.
          >>> folds = m.crossvalidation_split_df(df3, k = 2, fold_pct = 0.2)
          >>> folds
          [(  ds            y
              0 2022-12-03  7.67
              1 2022-12-04  7.64
              2 2022-12-05  7.55
              3 2022-12-06  8.25
              4 2022-12-07  8.32
              5 2022-12-08  9.59
              6 2022-12-09  8.52,
              ds            y
              0 2022-12-10  7.55
              1 2022-12-11  8.25),
          (   ds            y
              0 2022-12-03  7.67
              1 2022-12-04  7.64
              2 2022-12-05  7.55
              3 2022-12-06  8.25
              4 2022-12-07  8.32
              5 2022-12-08  9.59
              6 2022-12-09  8.52
              7 2022-12-10  7.55,
              ds            y
              0 2022-12-11  8.25
              1 2022-12-12  8.09)]
  
      We can also create a df with many IDs.
          >>> df1['ID'] = 'data1'
          >>> df2['ID'] = 'data2'
          >>> df3['ID'] = 'data3'
          >>> df = pd.concat((df1, df2, df3))
  
      When using the df with many IDs, there are three types of possible crossvalidation. The default crossvalidation
      is performed according to a timestamp threshold. In this case, we can have a different number of samples for
      each time series per fold. This approach prevents time leakage.
          >>> folds = m.crossvalidation_split_df(df, k = 2, fold_pct = 0.2)
      One can notice how each of the folds has a different number of samples for the validation set. Nonetheless,
      time leakage does not occur.
          >>> folds[0][1]
              ds	y	ID
          0	2022-12-10	8.09	data1
          1	2022-12-10	8.25	data2
          2	2022-12-11	8.30	data2
          3	2022-12-10	7.55	data3
          4	2022-12-11	8.25	data3
          >>> folds[1][1]
              ds	y	ID
          0	2022-12-11	8.30	data2
          1	2022-12-11	8.25	data3
          2	2022-12-12	8.09	data3
      In some applications, crossvalidating each of the time series locally may be more adequate.
          >>> folds = m.crossvalidation_split_df(df, k = 2, fold_pct = 0.2, global_model_cv_type = 'local')
      In this way, we prevent a different number of validation samples in each fold.
          >>> folds[0][1]
              ds	y	ID
          0	2022-12-08	7.65	data1
          1	2022-12-09	8.71	data1
          2	2022-12-09	8.07	data2
          3	2022-12-10	8.25	data2
          4	2022-12-10	7.55	data3
          5	2022-12-11	8.25	data3
          >>> folds[1][1]
              ds	y	ID
          0	2022-12-09	8.71	data1
          1	2022-12-10	8.09	data1
          2	2022-12-10	8.25	data2
          3	2022-12-11	8.30	data2
          4	2022-12-11	8.25	data3
          5	2022-12-12	8.09	data3
      The last type of global model crossvalidation gets the time intersection among all the time series used. There
      is no time leakage in this case, and we preserve the same number of samples per fold. The only drawback of this
      approach is that some of the samples may not be used (those not in the time intersection).
          >>> folds = m.crossvalidation_split_df(df, k = 2, fold_pct = 0.2, global_model_cv_type = 'intersect')
          >>> folds[0][1]
              ds	y	ID
          0	2022-12-09	8.71	data1
          1	2022-12-09	8.07	data2
          2	2022-12-09	8.52	data3
          0 2022-12-09  8.52}
          >>> folds[1][1]
              ds	y	ID
          0	2022-12-10	8.09	data1
          1	2022-12-10	8.25	data2
          2	2022-12-10	7.55	data3
      """
      (
          df,
          received_ID_col,
          received_single_time_series,
          _,
      ) = df_utils.prep_or_copy_df(df)
      df = _check_dataframe(self, df, check_y=False, exogenous=False)
      freq = df_utils.infer_frequency(
          df, n_lags=self.max_lags, freq=freq
      )
      df = _handle_missing_data(
          df=df,
          freq=freq,
          n_lags=self.n_lags,
          n_forecasts=self.n_forecasts,
          config_missing=self.config_missing,
          config_regressors=self.config_regressors,
          config_lagged_regressors=self.config_lagged_regressors,
          config_events=self.config_events,
          config_seasonality=self.config_seasonality,
          predicting=False,
      )
      folds = df_utils.crossvalidation_split_df(
          df,
          n_lags=self.max_lags,
          n_forecasts=self.n_forecasts,
          k=k,
          fold_pct=fold_pct,
          fold_overlap_pct=fold_overlap_pct,
          global_model_cv_type=global_model_cv_type,
      )
      if not received_ID_col and received_single_time_series:
          # Delete ID column (__df__) of df_train and df_val of all folds in case ID was not previously provided
          for i in range(len(folds)):
              del folds[i][0]["ID"]
              del folds[i][1]["ID"]
      return folds
  
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 13 for calling the NeuralProphet obj's underlying member method code with example usage: obj.crossvalidation_split_df(df, freq, k, fold_pct, fold_overlap_pct, global_model_cv_type) and returns: folds