class_docstr: The approximate lazy/accelerated greedy algorithm for optimization.
  
  The approximate lazy greedy algorithm is a simple extension of the lazy 
  greedy algorithm that, rather than requiring that an element remains at 
  the top of the priority queue after being re-evaluated, only requires 
  that the gain is within a certain user-defined percentage of the best 
  gain to be selected. The key point in this approach is that finding the 
  very best element while maintaining the priority queue may be expensive, 
  but finding elements that are good enough is simple. While the best 
  percentage to use is data set specific, even values near 1 can lead to 
  large savings in computation.
  
  .. code::python
  
          from apricot import FeatureBasedSelection
  
          X = numpy.random.randint(10, size=(10000, 100))
  
          selector = FeatureBasedSelection(100, 'sqrt', optimizer='approximate-lazy')
          selector.fit(X)
  
  Parameters
  ----------
  self.function : base.BaseSelection
          A submodular function that implements the `_calculate_gains` and
          `_select_next` methods. This is the function that will be
          optimized.
  
  self.verbose : bool
          Whether to display a progress bar during the optimization process.
  
  
  Attributes
  ----------
  self.function : base.BaseSelection
          A submodular function that implements the `_calculate_gains` and
          `_select_next` methods. This is the function that will be
          optimized.
  
  self.verbose : bool
          Whether to display a progress bar during the optimization process.
  
  self.pq : utils.PriorityQueue
          The priority queue used to order examples for evaluation.
  
  self.gains_ : numpy.ndarray or None
          The gain that each example would give the last time that it was
          evaluated.
class_docstr_tok: ["The","approximate","lazy\/accelerated","greedy","algorithm","for","optimization",".","The","approximate","lazy","greedy","algorithm","is","a","simple","extension","of","the","lazy","greedy","algorithm","that",",","rather","than","requiring","that","an","element","remains","at","the","top","of","the","priority","queue","after","being","re-evaluated",",","only","requires","that","the","gain","is","within","a","certain","user-defined","percentage","of","the","best","gain","to","be","selected",".","The","key","point","in","this","approach","is","that","finding","the","very","best","element","while","maintaining","the","priority","queue","may","be","expensive",",","but","finding","elements","that","are","good","enough","is","simple",".","While","the","best","percentage","to","use","is","data","set","specific",",","even","values","near","1","can","lead","to","large","savings","in","computation",".","..","code",":",":python","from","apricot","import","FeatureBasedSelection","X","=","numpy.random.randint","(","10",",","size=","(","10000",",","100",")",")","selector","=","FeatureBasedSelection","(","100",",","'sqrt","'",",","optimizer='approximate-lazy","'",")","selector.fit","(","X",")","Parameters","--","--","--","--","--","self.function",":","base.BaseSelection","A","submodular","function","that","implements","the","`","_calculate_gains","`","and","`","_select_next","`","methods",".","This","is","the","function","that","will","be","optimized",".","self.verbose",":","bool","Whether","to","display","a","progress","bar","during","the","optimization","process",".","Attributes","--","--","--","--","--","self.function",":","base.BaseSelection","A","submodular","function","that","implements","the","`","_calculate_gains","`","and","`","_select_next","`","methods",".","This","is","the","function","that","will","be","optimized",".","self.verbose",":","bool","Whether","to","display","a","progress","bar","during","the","optimization","process",".","self.pq",":","utils.PriorityQueue","The","priority","queue","used","to","order","examples","for","evaluation",".","self.gains_",":","numpy.ndarray","or","None","The","gain","that","each","example","would","give","the","last","time","that","it","was","evaluated","."]
code: def __init__(
      self,
      function=None,
      beta=0.9,
      random_state=None,
      n_jobs=None,
      verbose=False,
  ):
      self.beta = beta
      super(ApproximateLazyGreedy, self).__init__(
          function=function,
          random_state=random_state,
          n_jobs=n_jobs,
          verbose=verbose,
      )
  
imports: import os
  import copy
  import numpy
  import scipy
  from tqdm import tqdm
  from .utils import PriorityQueue
  from .utils import check_random_state
  from .utils import _calculate_pairwise_distances
label_desc: Use image node_id 1 to create a new ApproximateLazyGreedy object from inherited base classes: BaseOptimizer with example: obj = ApproximateLazyGreedy(function, beta, random_state, n_jobs, verbose)