class_docstr: The naive greedy algorithm for optimization.
  
  The naive greedy algorithm is the simplest greedy approach for optimizing 
  submodular functions. The approach simply iterates through each example in 
  the ground set that has not already been selected and calculates the gain 
  in function value that would result from adding that example to the 
  selected set. This process is embarassingly parallel and so is extremely 
  amenable both to parallel processing and distributed computing. Further, 
  because it is conceptually simple, it is also simple to implement.
  
  The naive greedy algorithm can be specified for any function by passing in 
  `optimizer='naive'` to the relevant selector object. Here is an example of 
  specifying the naive greedy algorithm for optimizing a feature-based function.
  
  .. code::python
  
          from apricot import FeatureBasedSelection
  
          X = numpy.random.randint(10, size=(10000, 100))
  
          selector = FeatureBasedSelection(100, 'sqrt', optimizer='naive')
          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.gains_ : numpy.ndarray or None
          The gain that each example would give the last time that it was
          evaluated.
class_docstr_tok: ["The","naive","greedy","algorithm","for","optimization",".","The","naive","greedy","algorithm","is","the","simplest","greedy","approach","for","optimizing","submodular","functions",".","The","approach","simply","iterates","through","each","example","in","the","ground","set","that","has","not","already","been","selected","and","calculates","the","gain","in","function","value","that","would","result","from","adding","that","example","to","the","selected","set",".","This","process","is","embarassingly","parallel","and","so","is","extremely","amenable","both","to","parallel","processing","and","distributed","computing",".","Further",",","because","it","is","conceptually","simple",",","it","is","also","simple","to","implement",".","The","naive","greedy","algorithm","can","be","specified","for","any","function","by","passing","in","`","optimizer='naive","'","`","to","the","relevant","selector","object",".","Here","is","an","example","of","specifying","the","naive","greedy","algorithm","for","optimizing","a","feature-based","function",".","..","code",":",":python","from","apricot","import","FeatureBasedSelection","X","=","numpy.random.randint","(","10",",","size=","(","10000",",","100",")",")","selector","=","FeatureBasedSelection","(","100",",","'sqrt","'",",","optimizer='naive","'",")","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.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, random_state=None, n_jobs=None, verbose=False
  ):
      super(NaiveGreedy, 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 NaiveGreedy object from inherited base classes: BaseOptimizer with example: obj = NaiveGreedy(function, random_state, n_jobs, verbose)