class_docstr: Implementation of LSTMFCNClassifier from Karim et al (2019) [1].
  
  Overview
  --------
   Combines an LSTM arm with a CNN arm. Optionally uses an attention mechanism in the
   LSTM which the author indicates provides improved performance.
  
  
  Parameters
  ----------
  n_epochs: int, default=2000
   the number of epochs to train the model
  batch_size: int, default=128
      the number of samples per gradient update.
  dropout: float, default=0.8
      controls dropout rate of LSTM layer
  kernel_sizes: list of ints, default=[8, 5, 3]
      specifying the length of the 1D convolution windows
  filter_sizes: int, list of ints, default=[128, 256, 128]
      size of filter for each conv layer
  lstm_size: int, default=8
      output dimension for LSTM layer
  attention: boolean, default=False
      If True, uses custom attention LSTM layer
  callbacks: keras callbacks, default=ReduceLRonPlateau
      Keras callbacks to use such as learning rate reduction or saving best model
      based on validation error
  verbose: 'auto', 0, 1, or 2. Verbosity mode.
      0 = silent, 1 = progress bar, 2 = one line per epoch.
      'auto' defaults to 1 for most cases, but 2 when used with
      `ParameterServerStrategy`. Note that the progress bar is not
      particularly useful when logged to a file, so verbose=2 is
      recommended when not running interactively (eg, in a production
      environment).
  random_state : int or None, default=None
      Seed for random, integer.
  
  
  Notes
  -----
  Ported from sktime-dl source code
  https://github.com/sktime/sktime-dl/blob/master/sktime_dl/classification/_lstmfcn.py
  
  References
  ----------
  .. [1] Karim et al. Multivariate LSTM-FCNs for Time Series Classification, 2019
  https://arxiv.org/pdf/1801.04503.pdf
docstr: Fit the classifier on the training set (X, y).
  
  ----------
  X : a nested pd.Dataframe, or (if input_checks=False) array-like of
  shape = (n_instances, series_length, n_dimensions)
      The training input samples. If a 2D array-like is passed,
      n_dimensions is assumed to be 1.
  y : array-like, shape = [n_instances]
      The training data class labels.
  input_checks : boolean
      whether to check the X and y parameters
  validation_X : a nested pd.Dataframe, or array-like of shape =
  (n_instances, series_length, n_dimensions)
      The validation samples. If a 2D array-like is passed,
      n_dimensions is assumed to be 1.
      Unless strictly defined by the user via callbacks (such as
      EarlyStopping), the presence or state of the validation
      data does not alter training in any way. Predictions at each epoch
      are stored in the model's fit history.
  validation_y : array-like, shape = [n_instances]
      The validation class labels.
  
  Returns
  -------
  self : object
code: def _fit(self, X, y):
      """
      Fit the classifier on the training set (X, y).
  
      ----------
      X : a nested pd.Dataframe, or (if input_checks=False) array-like of
      shape = (n_instances, series_length, n_dimensions)
          The training input samples. If a 2D array-like is passed,
          n_dimensions is assumed to be 1.
      y : array-like, shape = [n_instances]
          The training data class labels.
      input_checks : boolean
          whether to check the X and y parameters
      validation_X : a nested pd.Dataframe, or array-like of shape =
      (n_instances, series_length, n_dimensions)
          The validation samples. If a 2D array-like is passed,
          n_dimensions is assumed to be 1.
          Unless strictly defined by the user via callbacks (such as
          EarlyStopping), the presence or state of the validation
          data does not alter training in any way. Predictions at each epoch
          are stored in the model's fit history.
      validation_y : array-like, shape = [n_instances]
          The validation class labels.
  
      Returns
      -------
      self : object
      """
      check_random_state(self.random_state)
  
      y_onehot = self.convert_y_to_keras(y)
  
      # Remove?
      # Transpose to conform to Keras input style.
      X = X.transpose(0, 2, 1)
  
      # ignore the number of instances, X.shape[0],
      # just want the shape of each instance
      self.input_shape = X.shape[1:]
  
      self.model_ = self.build_model(self.input_shape, self.n_classes_)
  
      if self.verbose:
          self.model_.summary()
  
      self.history = self.model_.fit(
          X,
          y_onehot,
          batch_size=self.batch_size,
          epochs=self.n_epochs,
          verbose=self.verbose,
          callbacks=deepcopy(self.callbacks) if self.callbacks else [],
      )
  
      self._is_fitted = True
  
      return self
  
file_path: sktime/sktime/classification/deep_learning/lstmfcn.py
imports: from copy import deepcopy
  from sklearn.utils import check_random_state
  from sktime.classification.deep_learning.base import BaseDeepClassifier
  from sktime.networks.lstmfcn import LSTMFCNNetwork
label_desc: Use image node_id 3 for calling the LSTMFCNClassifier obj's underlying member method code with example usage: obj._fit(X, y) and returns: self