class_docstr: Abstract base class for early time series classifiers.
  
  The base classifier specifies the methods and method signatures that all
  early classifiers have to implement. Attributes with an underscore suffix are set in
  the method fit.
  
  Parameters
  ----------
  classes_            : ndarray of class labels, possibly strings
  n_classes_          : integer, number of classes (length of classes_)
  fit_time_           : integer, time (in milliseconds) for fit to run.
  _class_dictionary   : dictionary mapping classes_ onto integers 0...n_classes_-1.
  _threads_to_use     : number of threads to use in fit as determined by n_jobs.
  state_info          : An array containing the state info for each decision in X.
class_docstr_tok: ["Abstract","base","class","for","early","time","series","classifiers",".","The","base","classifier","specifies","the","methods","and","method","signatures","that","all","early","classifiers","have","to","implement",".","Attributes","with","an","underscore","suffix","are","set","in","the","method","fit",".","Parameters","--","--","--","--","--","classes_",":","ndarray","of","class","labels",",","possibly","strings","n_classes_",":","integer",",","number","of","classes","(","length","of","classes_",")","fit_time_",":","integer",",","time","(","in","milliseconds",")","for","fit","to","run",".","_class_dictionary",":","dictionary","mapping","classes_","onto","integers","0","...","n_classes_-1",".","_threads_to_use",":","number","of","threads","to","use","in","fit","as","determined","by","n_jobs",".","state_info",":","An","array","containing","the","state","info","for","each","decision","in","X","."]
docstr: Update label prediction for sequences in X at a larger series length.
  
  Uses information stored in the classifiers state from previous predictions and
  updates at shorter series lengths. Update will only accept cases which have not
  yet had a decision made, cases which have had a positive decision should be
  removed from the input with the row ordering preserved.
  
  If no state information is present, predict will be called instead.
  
  Prediction updates will return -1 for cases which it cannot make a decision on
  yet. The output is only guaranteed to return a valid class label for all cases
  when using the full series length.
  
  Parameters
  ----------
  X : 3D np.array (any number of dimensions, equal length series)
          of shape [n_instances, n_dimensions, series_length]
      or 2D np.array (univariate, equal length series)
          of shape [n_instances, series_length]
      or pd.DataFrame with each column a dimension, each cell a pd.Series
          (any number of dimensions, equal or unequal length series)
      or of any other supported Panel mtype
          for list of mtypes, see datatypes.SCITYPE_REGISTER
          for specifications, see examples/AA_datatypes_and_datasets.ipynb
  
  Returns
  -------
  y : 1D np.array of int, of shape [n_instances] - predicted class labels
      indices correspond to instance indices in X
  decisions : 1D bool array
      An array of booleans, containing the decision of whether a prediction is
      safe to use or not.
      i-th entry is the classifier decision that i-th instance safe to use
docstr_tok: ["Update","label","prediction","for","sequences","in","X","at","a","larger","series","length",".","Uses","information","stored","in","the","classifiers","state","from","previous","predictions","and","updates","at","shorter","series","lengths",".","Update","will","only","accept","cases","which","have","not","yet","had","a","decision","made",",","cases","which","have","had","a","positive","decision","should","be","removed","from","the","input","with","the","row","ordering","preserved",".","If","no","state","information","is","present",",","predict","will","be","called","instead",".","Prediction","updates","will","return","-1","for","cases","which","it","can","not","make","a","decision","on","yet",".","The","output","is","only","guaranteed","to","return","a","valid","class","label","for","all","cases","when","using","the","full","series","length",".","Parameters","--","--","--","--","--","X",":","3D","np.array","(","any","number","of","dimensions",",","equal","length","series",")","of","shape","[","n_instances",",","n_dimensions",",","series_length","]","or","2D","np.array","(","univariate",",","equal","length","series",")","of","shape","[","n_instances",",","series_length","]","or","pd.DataFrame","with","each","column","a","dimension",",","each","cell","a","pd.Series","(","any","number","of","dimensions",",","equal","or","unequal","length","series",")","or","of","any","other","supported","Panel","mtype","for","list","of","mtypes",",","see","datatypes.SCITYPE_REGISTER","for","specifications",",","see","examples\/AA_datatypes_and_datasets.ipynb","Returns","--","--","--","-","y",":","1D","np.array","of","int",",","of","shape","[","n_instances","]","-","predicted","class","labels","indices","correspond","to","instance","indices","in","X","decisions",":","1D","bool","array","An","array","of","booleans",",","containing","the","decision","of","whether","a","prediction","is","safe","to","use","or","not",".","i-th","entry","is","the","classifier","decision","that","i-th","instance","safe","to","use"]
code: def update_predict(self, X) -> Tuple[np.ndarray, np.ndarray]:
      """Update label prediction for sequences in X at a larger series length.
  
      Uses information stored in the classifiers state from previous predictions and
      updates at shorter series lengths. Update will only accept cases which have not
      yet had a decision made, cases which have had a positive decision should be
      removed from the input with the row ordering preserved.
  
      If no state information is present, predict will be called instead.
  
      Prediction updates will return -1 for cases which it cannot make a decision on
      yet. The output is only guaranteed to return a valid class label for all cases
      when using the full series length.
  
      Parameters
      ----------
      X : 3D np.array (any number of dimensions, equal length series)
              of shape [n_instances, n_dimensions, series_length]
          or 2D np.array (univariate, equal length series)
              of shape [n_instances, series_length]
          or pd.DataFrame with each column a dimension, each cell a pd.Series
              (any number of dimensions, equal or unequal length series)
          or of any other supported Panel mtype
              for list of mtypes, see datatypes.SCITYPE_REGISTER
              for specifications, see examples/AA_datatypes_and_datasets.ipynb
  
      Returns
      -------
      y : 1D np.array of int, of shape [n_instances] - predicted class labels
          indices correspond to instance indices in X
      decisions : 1D bool array
          An array of booleans, containing the decision of whether a prediction is
          safe to use or not.
          i-th entry is the classifier decision that i-th instance safe to use
      """
      self.check_is_fitted()
  
      # boilerplate input checks for predict-like methods
      X = self._check_convert_X_for_predict(X)
  
      if self.state_info is None:
          return self._predict(X)
      else:
          return self._update_predict(X)
  
imports: from abc import ABC, abstractmethod
  from typing import Tuple
  import numpy
  from sktime.base import BaseEstimator
  from sktime.classification import BaseClassifier
label_desc: Use image node_id 4 for calling the BaseEarlyClassifier obj's underlying member method code with example usage: obj.update_predict(X) and returns: self, self