class_docstr: This class is an model of a general deep active learning algorithm.
  Differences to the classical ActiveLearner are:
      - Data is no member variable of the DeepActiveLearner class
      - Misses the initial add/train data methods, therefore always trains on new data
      - Uses different interfaces to sklearn in some functions
  
  Args:
      estimator: The estimator to be used in the active learning loop.
      query_strategy: Function providing the query strategy for the active learning loop,
          for instance, modAL.uncertainty.uncertainty_sampling.
      on_transformed: Whether to transform samples with the pipeline defined by the estimator
          when applying the query strategy.
      **fit_kwargs: keyword arguments.
  
  Attributes:
      estimator: The estimator to be used in the active learning loop.
      query_strategy: Function providing the query strategy for the active learning loop.
class_docstr_tok: ["This","class","is","an","model","of","a","general","deep","active","learning","algorithm",".","Differences","to","the","classical","ActiveLearner","are",":","-","Data","is","no","member","variable","of","the","DeepActiveLearner","class","-","Misses","the","initial","add\/train","data","methods",",","therefore","always","trains","on","new","data","-","Uses","different","interfaces","to","sklearn","in","some","functions","Args",":","estimator",":","The","estimator","to","be","used","in","the","active","learning","loop",".","query_strategy",":","Function","providing","the","query","strategy","for","the","active","learning","loop",",","for","instance",",","modAL.uncertainty.uncertainty_sampling",".","on_transformed",":","Whether","to","transform","samples","with","the","pipeline","defined","by","the","estimator","when","applying","the","query","strategy",".","*","*","fit_kwargs",":","keyword","arguments",".","Attributes",":","estimator",":","The","estimator","to","be","used","in","the","active","learning","loop",".","query_strategy",":","Function","providing","the","query","strategy","for","the","active","learning","loop","."]
docstr: Trains the predictor with the passed data (warm_start decides if params are resetted or not). 
  
  Args:
      X: The new samples for which the labels are supplied by the expert.
      y: Labels corresponding to the new instances in X.
      warm_start: If False, the model parameters are resetted and the training starts from zero, 
          otherwise the pre trained model is kept and further trained.
      bootstrap: If True, training is done on a bootstrapped dataset. Useful for building Committee models
          with bagging.
      **fit_kwargs: Keyword arguments to be passed to the fit method of the predictor.
docstr_tok: ["Trains","the","predictor","with","the","passed","data","(","warm_start","decides","if","params","are","resetted","or","not",")",".","Args",":","X",":","The","new","samples","for","which","the","labels","are","supplied","by","the","expert",".","y",":","Labels","corresponding","to","the","new","instances","in","X.","warm_start",":","If","False",",","the","model","parameters","are","resetted","and","the","training","starts","from","zero",",","otherwise","the","pre","trained","model","is","kept","and","further","trained",".","bootstrap",":","If","True",",","training","is","done","on","a","bootstrapped","dataset",".","Useful","for","building","Committee","models","with","bagging",".","*","*","fit_kwargs",":","Keyword","arguments","to","be","passed","to","the","fit","method","of","the","predictor","."]
code: def teach(
      self,
      X: modALinput,
      y: modALinput,
      warm_start: bool = True,
      bootstrap: bool = False,
      **fit_kwargs,
  ) -> None:
      """
      Trains the predictor with the passed data (warm_start decides if params are resetted or not).
  
      Args:
          X: The new samples for which the labels are supplied by the expert.
          y: Labels corresponding to the new instances in X.
          warm_start: If False, the model parameters are resetted and the training starts from zero,
              otherwise the pre trained model is kept and further trained.
          bootstrap: If True, training is done on a bootstrapped dataset. Useful for building Committee models
              with bagging.
          **fit_kwargs: Keyword arguments to be passed to the fit method of the predictor.
      """
  
      if warm_start:
          if not bootstrap:
              self.estimator.partial_fit(X, y, **fit_kwargs)
          else:
              bootstrap_idx = np.random.choice(
                  range(X.shape[0]), X.shape[0], replace=True
              )
              self.estimator.partial_fit(
                  X[bootstrap_idx], y[bootstrap_idx], **fit_kwargs
              )
      else:
          self._fit_on_new(X, y, bootstrap=bootstrap, **fit_kwargs)
  
imports: from typing import Any, Callable, List, Optional, Tuple
  import numpy
  from modAL.acquisition import max_EI
  from modAL.disagreement import max_std_sampling, vote_entropy_sampling
  from modAL.models.base import BaseCommittee, BaseLearner
  from modAL.uncertainty import uncertainty_sampling
  from modAL.utils.data import data_vstack, modALinput, retrieve_rows
  from modAL.utils.validation import check_class_labels, check_class_proba
  from sklearn.base import BaseEstimator
  from sklearn.metrics import accuracy_score
  from sklearn.utils import check_X_y
label_desc: Use image node_id 3 for calling the DeepActiveLearner obj's underlying member method code with example usage: obj.teach(X, y, warm_start, bootstrap) without return types