class_docstr: Inherits time series methods from TSM parent class.
  
  **** NEURAL NETWORK AUTOREGRESSIVE INTEGRATED (NNAR) MODELS ****
  
  Parameters
  ----------
  data : pd.DataFrame or np.ndarray
      Field to specify the univariate time series data that will be used.
  
  ar : int
      Field to specify how many AR lags the model will have.
  
  integ : int (default : 0)
      Specifies how many times to difference the time series.
  
  units : int
      How many units for the neural network
  
  layers : int
      How many layers for the neural networ
  
  activation : function
      E.g. np.tanh, np.array (linear)
  
  target : str (if data is a pd.DataFrame) or int (if data is a np.ndarray)
      Specifies which column name or array index to use. By default, first
      column/array index will be selected as the dependent variable.
  
  family: family object
      E.g. pf.Normal()
  
  activation : function
      Non-linear transformation for the weights, e.g. np.tanh
  
  initialize_random : boolean
      Whether to initialzie the weights with N(0,1) random variables
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","parent","class",".","*","*","*","*","NEURAL","NETWORK","AUTOREGRESSIVE","INTEGRATED","(","NNAR",")","MODELS","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","or","np.ndarray","Field","to","specify","the","univariate","time","series","data","that","will","be","used",".","ar",":","int","Field","to","specify","how","many","AR","lags","the","model","will","have",".","integ",":","int","(","default",":","0",")","Specifies","how","many","times","to","difference","the","time","series",".","units",":","int","How","many","units","for","the","neural","network","layers",":","int","How","many","layers","for","the","neural","networ","activation",":","function","E.g",".","np.tanh",",","np.array","(","linear",")","target",":","str","(","if","data","is","a","pd.DataFrame",")","or","int","(","if","data","is","a","np.ndarray",")","Specifies","which","column","name","or","array","index","to","use",".","By","default",",","first","column\/array","index","will","be","selected","as","the","dependent","variable",".","family",":","family","object","E.g",".","pf.Normal","(",")","activation",":","function","Non-linear","transformation","for","the","weights",",","e.g",".","np.tanh","initialize_random",":","boolean","Whether","to","initialzie","the","weights","with","N","(","0,1",")","random","variables"]
docstr: Makes dynamic out-of-sample predictions with the estimated model on in-sample data
  
  Parameters
  ----------
  h : int (default : 5)
      How many steps would you like to forecast?
  
  fit_once : boolean
      (default: True) Fits only once before the in-sample prediction; if False, fits after every new datapoint
  
  fit_method : string
      Which method to fit the model with
  
  intervals: boolean
      Whether to return prediction intervals
  
  Returns
  ----------
  - pd.DataFrame with predicted values
docstr_tok: ["Makes","dynamic","out-of-sample","predictions","with","the","estimated","model","on","in-sample","data","Parameters","--","--","--","--","--","h",":","int","(","default",":","5",")","How","many","steps","would","you","like","to","forecast","?","fit_once",":","boolean","(","default",":","True",")","Fits","only","once","before","the","in-sample","prediction",";","if","False",",","fits","after","every","new","datapoint","fit_method",":","string","Which","method","to","fit","the","model","with","intervals",":","boolean","Whether","to","return","prediction","intervals","Returns","--","--","--","--","--","-","pd.DataFrame","with","predicted","values"]
code: def predict_is(
      self,
      h=5,
      fit_once=True,
      fit_method="MLE",
      intervals=False,
      **kwargs,
  ):
      """Makes dynamic out-of-sample predictions with the estimated model on in-sample data
  
      Parameters
      ----------
      h : int (default : 5)
          How many steps would you like to forecast?
  
      fit_once : boolean
          (default: True) Fits only once before the in-sample prediction; if False, fits after every new datapoint
  
      fit_method : string
          Which method to fit the model with
  
      intervals: boolean
          Whether to return prediction intervals
  
      Returns
      ----------
      - pd.DataFrame with predicted values
      """
      predictions = []
  
      for t in range(0, h):
          x = NNAR(
              ar=self.ar,
              integ=self.integ,
              units=self.units,
              layers=self.layers,
              target=self.target,
              data=self.data_original[: -h + t],
              family=self.family,
          )
          if fit_once is False:
              x.fit(method=fit_method, printer=False)
          if t == 0:
              if fit_once is True:
                  x.fit(method=fit_method, printer=False)
                  saved_lvs = x.latent_variables
              predictions = x.predict(1, intervals=intervals)
          else:
              if fit_once is True:
                  x.latent_variables = saved_lvs
              predictions = pd.concat(
                  [predictions, x.predict(1, intervals=intervals)]
              )
  
      if intervals is True:
          predictions.rename(
              columns={
                  0: self.data_name,
                  1: "1% Prediction Interval",
                  2: "5% Prediction Interval",
                  3: "95% Prediction Interval",
                  4: "99% Prediction Interval",
              },
              inplace=True,
          )
      else:
          predictions.rename(columns={0: self.data_name}, inplace=True)
  
      predictions.index = self.index[-h:]
  
      return predictions
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  from ..None import families
  from ..None import output
  from ..None import tests
  from ..None import tsm
  from ..None import data_check
  from .nn_architecture import neural_network_tanh, neural_network_tanh_mb
label_desc: Use image node_id 17 for calling the NNAR obj's underlying member method code with example usage: obj.predict_is(h, fit_once, fit_method, intervals) and returns: predictions