class_docstr: This class is an model of a general classic (machine learning) active learning algorithm.
  
  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.
      X_training: Initial training samples, if available.
      y_training: Initial training labels corresponding to initial training samples.
      bootstrap_init: If initial training data is available, bootstrapping can be done during the first training.
          Useful when building Committee models with bagging.
      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.
      X_training: If the model hasn't been fitted yet it is None, otherwise it contains the samples
          which the model has been trained on. If provided, the method fit() of estimator is called during __init__()
      y_training: The labels corresponding to X_training.
  
  Examples:
  
      >>> from sklearn.datasets import load_iris
      >>> from sklearn.ensemble import RandomForestClassifier
      >>> from modAL.models import ActiveLearner
      >>> iris = load_iris()
      >>> # give initial training examples
      >>> X_training = iris['data'][[0, 50, 100]]
      >>> y_training = iris['target'][[0, 50, 100]]
      >>>
      >>> # initialize active learner
      >>> learner = ActiveLearner(
      ...     estimator=RandomForestClassifier(),
      ...     X_training=X_training, y_training=y_training
      ... )
      >>>
      >>> # querying for labels
      >>> query_idx, query_sample = learner.query(iris['data'])
      >>>
      >>> # ...obtaining new labels from the Oracle...
      >>>
      >>> # teaching newly labelled examples
      >>> learner.teach(
      ...     X=iris['data'][query_idx].reshape(1, -1),
      ...     y=iris['target'][query_idx].reshape(1, )
      ... )
class_docstr_tok: ["This","class","is","an","model","of","a","general","classic","(","machine","learning",")","active","learning","algorithm",".","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",".","X_training",":","Initial","training","samples",",","if","available",".","y_training",":","Initial","training","labels","corresponding","to","initial","training","samples",".","bootstrap_init",":","If","initial","training","data","is","available",",","bootstrapping","can","be","done","during","the","first","training",".","Useful","when","building","Committee","models","with","bagging",".","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",".","X_training",":","If","the","model","has","n't","been","fitted","yet","it","is","None",",","otherwise","it","contains","the","samples","which","the","model","has","been","trained","on",".","If","provided",",","the","method","fit","(",")","of","estimator","is","called","during","__init__","(",")","y_training",":","The","labels","corresponding","to","X_training",".","Examples",":",">",">",">","from","sklearn.datasets","import","load_iris",">",">",">","from","sklearn.ensemble","import","RandomForestClassifier",">",">",">","from","modAL.models","import","ActiveLearner",">",">",">","iris","=","load_iris","(",")",">",">",">","#","give","initial","training","examples",">",">",">","X_training","=","iris","[","'data","'","]","[","[","0",",","50",",","100","]","]",">",">",">","y_training","=","iris","[","'target","'","]","[","[","0",",","50",",","100","]","]",">",">",">",">",">",">","#","initialize","active","learner",">",">",">","learner","=","ActiveLearner","(","...","estimator=RandomForestClassifier","(",")",",","...","X_training=X_training",",","y_training=y_training","...",")",">",">",">",">",">",">","#","querying","for","labels",">",">",">","query_idx",",","query_sample","=","learner.query","(","iris","[","'data","'","]",")",">",">",">",">",">",">","#","...","obtaining","new","labels","from","the","Oracle","...",">",">",">",">",">",">","#","teaching","newly","labelled","examples",">",">",">","learner.teach","(","...","X=iris","[","'data","'","]","[","query_idx","]",".reshape","(","1",",","-1",")",",","...","y=iris","[","'target","'","]","[","query_idx","]",".reshape","(","1",",",")","...",")"]
docstr: Interface for the fit method of the predictor. Fits the predictor to the supplied data, then stores it
  internally for the active learning loop.
  
  Args:
      X: The samples to be fitted.
      y: The corresponding labels.
      bootstrap: If true, trains the estimator on a set bootstrapped from X.
          Useful for building Committee models with bagging.
      **fit_kwargs: Keyword arguments to be passed to the fit method of the predictor.
  
  Note:
      When using scikit-learn estimators, calling this method will make the ActiveLearner forget all training data
      it has seen!
  
  Returns:
      self
docstr_tok: ["Interface","for","the","fit","method","of","the","predictor",".","Fits","the","predictor","to","the","supplied","data",",","then","stores","it","internally","for","the","active","learning","loop",".","Args",":","X",":","The","samples","to","be","fitted",".","y",":","The","corresponding","labels",".","bootstrap",":","If","true",",","trains","the","estimator","on","a","set","bootstrapped","from","X",".","Useful","for","building","Committee","models","with","bagging",".","*","*","fit_kwargs",":","Keyword","arguments","to","be","passed","to","the","fit","method","of","the","predictor",".","Note",":","When","using","scikit-learn","estimators",",","calling","this","method","will","make","the","ActiveLearner","forget","all","training","data","it","has","seen","!","Returns",":","self"]
code: def fit(
      self,
      X: modALinput,
      y: modALinput,
      bootstrap: bool = False,
      **fit_kwargs,
  ) -> "BaseLearner":
      """
      Interface for the fit method of the predictor. Fits the predictor to the supplied data, then stores it
      internally for the active learning loop.
  
      Args:
          X: The samples to be fitted.
          y: The corresponding labels.
          bootstrap: If true, trains the estimator on a set bootstrapped from X.
              Useful for building Committee models with bagging.
          **fit_kwargs: Keyword arguments to be passed to the fit method of the predictor.
  
      Note:
          When using scikit-learn estimators, calling this method will make the ActiveLearner forget all training data
          it has seen!
  
      Returns:
          self
      """
      check_X_y(
          X,
          y,
          accept_sparse=True,
          ensure_2d=False,
          allow_nd=True,
          multi_output=True,
          dtype=None,
          force_all_finite=self.force_all_finite,
      )
      self.X_training, self.y_training = X, y
      return self._fit_to_known(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 4 for calling the ActiveLearner obj's underlying member method code with example usage: obj.fit(X, y, bootstrap) and returns: self