parameters: (self, batch_vectorizer=None, num_collection_passes=1, reset_nwt=True)
docstring: :Description: proceeds the learning of topic model in offline mode
  
          :param object_referenece batch_vectorizer: an instance of BatchVectorizer class
          :param int num_collection_passes: number of iterations over whole given collection
          :param bool reset_nwt: a flag indicating whether to reset n_wt matrix to 0.
docstring_summary: :Description: proceeds the learning of topic model in offline mode
docstring_tokens: : Description : proceeds the learning of topic model in offline mode
function: def fit_offline(self, batch_vectorizer=None, num_collection_passes=1, reset_nwt=True):
          """
          :Description: proceeds the learning of topic model in offline mode
  
          :param object_referenece batch_vectorizer: an instance of BatchVectorizer class
          :param int num_collection_passes: number of iterations over whole given collection
          :param bool reset_nwt: a flag indicating whether to reset n_wt matrix to 0.
          """
          if batch_vectorizer is None:
              raise IOError('No batches were given for processing')
  
          if not self._initialized:
              raise RuntimeError('The model was not initialized. Use initialize() method')
  
          # outer cycle is needed because of TopicSelectionThetaRegularizer
          # and current ScoreTracker implementation
  
          import warnings
          with warnings.catch_warnings():
              warnings.filterwarnings("ignore", category=DeprecationWarning)
              progress = tqdm.tnrange if _run_from_notebook() else tqdm.trange
              for _ in progress(num_collection_passes, desc='Pass',
                                disable=not self._show_progress_bars):
                  # temp code for easy using of TopicSelectionThetaRegularizer from Python
                  _topic_selection_regularizer_func(self, self._regularizers)
  
                  self._synchronizations_processed += 1
                  self._wait_for_batches_processed(
                      self._pool.apply_async(func=self.master.fit_offline,
                                             args=(batch_vectorizer.batches_ids,
                                                   batch_vectorizer.weights, 1, None, reset_nwt)),
                      batch_vectorizer.num_batches)
  
                  for name in self.scores.data.keys():
                      if name not in self.score_tracker:
                          self.score_tracker[name] =\
                              SCORE_TRACKER[self.scores[name].type](self.scores[name])
  
          self._phi_cached = None
function_tokens: def fit_offline ( self , batch_vectorizer = None , num_collection_passes = 1 , reset_nwt = True ) : if batch_vectorizer is None : raise IOError ( 'No batches were given for processing' ) if not self . _initialized : raise RuntimeError ( 'The model was not initialized. Use initialize() method' ) # outer cycle is needed because of TopicSelectionThetaRegularizer # and current ScoreTracker implementation import warnings with warnings . catch_warnings ( ) : warnings . filterwarnings ( "ignore" , category = DeprecationWarning ) progress = tqdm . tnrange if _run_from_notebook ( ) else tqdm . trange for _ in progress ( num_collection_passes , desc = 'Pass' , disable = not self . _show_progress_bars ) : # temp code for easy using of TopicSelectionThetaRegularizer from Python _topic_selection_regularizer_func ( self , self . _regularizers ) self . _synchronizations_processed += 1 self . _wait_for_batches_processed ( self . _pool . apply_async ( func = self . master . fit_offline , args = ( batch_vectorizer . batches_ids , batch_vectorizer . weights , 1 , None , reset_nwt ) ) , batch_vectorizer . num_batches ) for name in self . scores . data . keys ( ) : if name not in self . score_tracker : self . score_tracker [ name ] = SCORE_TRACKER [ self . scores [ name ] . type ] ( self . scores [ name ] ) self . _phi_cached = None