class_docstr: A pool-based active learner in which a pool holds all available unlabeled data.
  
  It uses a classifier, a query strategy and manages the mutually exclusive partition over the
  whole training data into labeled and unlabeled.
  
  Parameters
  ----------
  clf_factory : small_text.classifiers.factories.AbstractClassifierFactory
      A factory responsible for creating new classifier instances.
  query_strategy : small_text.query_strategies.QueryStrategy
      Query strategy which is responsible for selecting instances during a `query()` call.
  dataset : ~small_text.data.datasets.Dataset
      A training dataset that is supported by the underlying classifier.
  reuse_model : bool, default=False
      Reuses the previous model during retraining (if a previous model exists),
      otherwise creates a new model for each retraining.
  
  Attributes
  ----------
  indices_labeled : numpy.ndarray
      Indices of instances (relative to `self.x_train`) constituting the labeled pool.
  indices_ignored : numpy.ndarray or scipy.sparse.csr_matrix
      Indices of instances (relative to `self.x_train`) which have been ignored,
      i.e. which will never be returned by a query.
  y : numpy.ndarray or scipy.sparse.csr_matrix
      Labels for the the current labeled pool. Each tuple `(x_indices_labeled[i], y[i])`
      represents one labeled sample.
  indices_queried : numpy.ndarray or None
      Queried indices returned by the last `query()` call, or `None` if no query has been
      executed yet.
  fit_kwargs : dict
      Keyword arguments that will be passed to the `fit()` call during `update()`.
docstr: (Re-)Initializes the current labeled pool.
  
  This is required once before the first `query()` call, and whenever the labeled pool
  is changed from the outside, i.e. when `self.x_train` changes.
  
  Parameters
  ----------
  indices_initial : numpy.ndarray
      A list of indices (relative to `self.x_train`) of initially labeled samples.
  y_initial : numpy.ndarray or or scipy.sparse.csr_matrix
      Label matrix. One row corresponds to an index in `x_indices_initial`. If the
      passed type is numpy.ndarray (dense) all further label-based operations assume dense
      labels, otherwise sparse labels for scipy.sparse.csr_matrix.
  indices_ignored : numpy.ndarray
      List of ignored samples which will be invisible to the query strategy.
  indices_validation : numpy.ndarray, default=None
      The given indices (relative to `self.x_indices_labeled`) define a custom validation set
      if provided. Otherwise each classifier that uses a validation set will be responsible
      for creating a validation set. Only used if `retrain=True`.
  retrain : bool, default=True
      Retrains the model after the update if True.
docstr_tok: ["(","Re-",")","Initializes","the","current","labeled","pool",".","This","is","required","once","before","the","first","`","query","(",")","`","call",",","and","whenever","the","labeled","pool","is","changed","from","the","outside",",","i.e",".","when","`","self.x_train","`","changes",".","Parameters","--","--","--","--","--","indices_initial",":","numpy.ndarray","A","list","of","indices","(","relative","to","`","self.x_train","`",")","of","initially","labeled","samples",".","y_initial",":","numpy.ndarray","or","or","scipy.sparse.csr_matrix","Label","matrix",".","One","row","corresponds","to","an","index","in","`","x_indices_initial","`",".","If","the","passed","type","is","numpy.ndarray","(","dense",")","all","further","label-based","operations","assume","dense","labels",",","otherwise","sparse","labels","for","scipy.sparse.csr_matrix",".","indices_ignored",":","numpy.ndarray","List","of","ignored","samples","which","will","be","invisible","to","the","query","strategy",".","indices_validation",":","numpy.ndarray",",","default=None","The","given","indices","(","relative","to","`","self.x_indices_labeled","`",")","define","a","custom","validation","set","if","provided",".","Otherwise","each","classifier","that","uses","a","validation","set","will","be","responsible","for","creating","a","validation","set",".","Only","used","if","`","retrain=True","`",".","retrain",":","bool",",","default=True","Retrains","the","model","after","the","update","if","True","."]
code: def initialize_data(
      self,
      indices_initial,
      y_initial,
      indices_ignored=None,
      indices_validation=None,
      retrain=True,
  ):
      """(Re-)Initializes the current labeled pool.
  
      This is required once before the first `query()` call, and whenever the labeled pool
      is changed from the outside, i.e. when `self.x_train` changes.
  
      Parameters
      ----------
      indices_initial : numpy.ndarray
          A list of indices (relative to `self.x_train`) of initially labeled samples.
      y_initial : numpy.ndarray or or scipy.sparse.csr_matrix
          Label matrix. One row corresponds to an index in `x_indices_initial`. If the
          passed type is numpy.ndarray (dense) all further label-based operations assume dense
          labels, otherwise sparse labels for scipy.sparse.csr_matrix.
      indices_ignored : numpy.ndarray
          List of ignored samples which will be invisible to the query strategy.
      indices_validation : numpy.ndarray, default=None
          The given indices (relative to `self.x_indices_labeled`) define a custom validation set
          if provided. Otherwise each classifier that uses a validation set will be responsible
          for creating a validation set. Only used if `retrain=True`.
      retrain : bool, default=True
          Retrains the model after the update if True.
      """
      self.indices_labeled = indices_initial
      self._index_to_position = self._build_index_to_position_dict()
      self.y = y_initial
  
      if isinstance(self.y, csr_matrix):
          self.multi_label = True
      else:
          self.multi_label = False
  
      if indices_ignored is not None:
          self.indices_ignored = indices_ignored
      else:
          self.indices_ignored = np.empty(shape=(0), dtype=int)
  
      if retrain:
          self._retrain(indices_validation=indices_validation)
  
imports: import numpy
  from abc import ABC, abstractmethod
  from pathlib import Path
  from scipy.sparse import csr_matrix
  from small_text.base import LABEL_IGNORED
  from small_text.exceptions import LearnerNotInitializedException
  from small_text.utils.data import list_length
  from small_text.utils.labels import concatenate, get_ignored_labels_mask, remove_by_index
  from small_text.version import __version__
label_desc: Use image node_id 2 for calling the PoolBasedActiveLearner obj's underlying member method code with example usage: obj.initialize_data(indices_initial, y_initial, indices_ignored, indices_validation, retrain) without return types