parameters: (self, pwt, nwt=None, num_document_passes=None, batches_folder=None,
                          batches=None, regularizer_name=None, regularizer_tau=None,
                          class_ids=None, class_weights=None, find_theta=False,
                          transaction_typenames=None, transaction_weights=None,
                          reuse_theta=False, find_ptdw=False,
                          predict_class_id=None, predict_transaction_type=None)
return_statement: return result.theta_matrix, numpy_ndarray
docstring: :param str pwt: name of pwt matrix in BigARTM
          :param str nwt: name of nwt matrix in BigARTM
          :param int num_document_passes: number of inner iterations during processing
          :param str batches_folder: full path to data folder (alternative 1)
          :param batches: full file names of batches to process (alternative 2)
          :type batches: list of str
          :param regularizer_name: list of names of Theta regularizers to use
          :type regularizer_name: list of str
          :param regularizer_tau: list of tau coefficients for Theta regularizers
          :type regularizer_tau: list of float
          :param class_ids: list of class ids to use during processing.
          :type class_ids: list of str
          :param class_weights: list of corresponding weights of class ids.
          :type class_weights: list of float
          :param transaction_typenames: list of transaction types to use during processing.
          :type transaction_typenames: list of str
          :param transaction_weights: list of corresponding weights of transaction types.
          :type transaction_weights: list of float
          :param bool find_theta: find theta matrix for 'batches' (if alternative 2)
          :param bool reuse_theta: initialize by theta from previous collection pass
          :param bool find_ptdw: calculate and return Ptdw matrix or not\
                  (works if find_theta == False)
          :param predict_class_id: class_id of a target modality to predict
          :type predict_class_id: str, default None
          :return:
              * tuple (messages.ThetaMatrix, numpy.ndarray) --- the info about Theta\
                      (if find_theta == True)
              * messages.ThetaMatrix --- the info about Theta (if find_theta == False)
docstring_summary: :param str pwt: name of pwt matrix in BigARTM
          :param str nwt: name of nwt matrix in BigARTM
          :param int num_document_passes: number of inner iterations during processing
          :param str batches_folder: full path to data folder (alternative 1)
          :param batches: full file names of batches to process (alternative 2)
          :type batches: list of str
          :param regularizer_name: list of names of Theta regularizers to use
          :type regularizer_name: list of str
          :param regularizer_tau: list of tau coefficients for Theta regularizers
          :type regularizer_tau: list of float
          :param class_ids: list of class ids to use during processing.
          :type class_ids: list of str
          :param class_weights: list of corresponding weights of class ids.
          :type class_weights: list of float
          :param transaction_typenames: list of transaction types to use during processing.
          :type transaction_typenames: list of str
          :param transaction_weights: list of corresponding weights of transaction types.
          :type transaction_weights: list of float
          :param bool find_theta: find theta matrix for 'batches' (if alternative 2)
          :param bool reuse_theta: initialize by theta from previous collection pass
          :param bool find_ptdw: calculate and return Ptdw matrix or not\
                  (works if find_theta == False)
          :param predict_class_id: class_id of a target modality to predict
          :type predict_class_id: str, default None
          :return:
              * tuple (messages.ThetaMatrix, numpy.ndarray) --- the info about Theta\
                      (if find_theta == True)
              * messages.ThetaMatrix --- the info about Theta (if find_theta == False)
docstring_tokens: : param str pwt : name of pwt matrix in BigARTM : param str nwt : name of nwt matrix in BigARTM : param int num_document_passes : number of inner iterations during processing : param str batches_folder : full path to data folder ( alternative 1 ) : param batches : full file names of batches to process ( alternative 2 ) : type batches : list of str : param regularizer_name : list of names of Theta regularizers to use : type regularizer_name : list of str : param regularizer_tau : list of tau coefficients for Theta regularizers : type regularizer_tau : list of float : param class_ids : list of class ids to use during processing . : type class_ids : list of str : param class_weights : list of corresponding weights of class ids . : type class_weights : list of float : param transaction_typenames : list of transaction types to use during processing . : type transaction_typenames : list of str : param transaction_weights : list of corresponding weights of transaction types . : type transaction_weights : list of float : param bool find_theta : find theta matrix for batches ( if alternative 2 ) : param bool reuse_theta : initialize by theta from previous collection pass : param bool find_ptdw : calculate and return Ptdw matrix or not \ ( works if find_theta == False ) : param predict_class_id : class_id of a target modality to predict : type predict_class_id : str default None : return : * tuple ( messages . ThetaMatrix numpy . ndarray ) --- the info about Theta \ ( if find_theta == True ) * messages . ThetaMatrix --- the info about Theta ( if find_theta == False )
function: def process_batches(self, pwt, nwt=None, num_document_passes=None, batches_folder=None,
                          batches=None, regularizer_name=None, regularizer_tau=None,
                          class_ids=None, class_weights=None, find_theta=False,
                          transaction_typenames=None, transaction_weights=None,
                          reuse_theta=False, find_ptdw=False,
                          predict_class_id=None, predict_transaction_type=None):
          """
          :param str pwt: name of pwt matrix in BigARTM
          :param str nwt: name of nwt matrix in BigARTM
          :param int num_document_passes: number of inner iterations during processing
          :param str batches_folder: full path to data folder (alternative 1)
          :param batches: full file names of batches to process (alternative 2)
          :type batches: list of str
          :param regularizer_name: list of names of Theta regularizers to use
          :type regularizer_name: list of str
          :param regularizer_tau: list of tau coefficients for Theta regularizers
          :type regularizer_tau: list of float
          :param class_ids: list of class ids to use during processing.
          :type class_ids: list of str
          :param class_weights: list of corresponding weights of class ids.
          :type class_weights: list of float
          :param transaction_typenames: list of transaction types to use during processing.
          :type transaction_typenames: list of str
          :param transaction_weights: list of corresponding weights of transaction types.
          :type transaction_weights: list of float
          :param bool find_theta: find theta matrix for 'batches' (if alternative 2)
          :param bool reuse_theta: initialize by theta from previous collection pass
          :param bool find_ptdw: calculate and return Ptdw matrix or not\
                  (works if find_theta == False)
          :param predict_class_id: class_id of a target modality to predict
          :type predict_class_id: str, default None
          :return:
              * tuple (messages.ThetaMatrix, numpy.ndarray) --- the info about Theta\
                      (if find_theta == True)
              * messages.ThetaMatrix --- the info about Theta (if find_theta == False)
          """
          args = messages.ProcessBatchesArgs(pwt_source_name=pwt,
                                             reuse_theta=reuse_theta)
          if nwt is not None:
              args.nwt_target_name = nwt
          if batches_folder is not None:
              for name in os.listdir(batches_folder):
                  _, extension = os.path.splitext(name)
                  if extension == '.batch':
                      args.batch_filename.append(os.path.join(batches_folder, name))
          if batches is not None:
              for batch in batches:
                  args.batch_filename.append(batch)
  
          if num_document_passes is not None:
              args.num_document_passes = num_document_passes
  
          if regularizer_name is not None and regularizer_tau is not None:
              for name, tau in zip(regularizer_name, regularizer_tau):
                  args.regularizer_name.append(name)
                  args.regularizer_tau.append(tau)
  
          if transaction_typenames is not None and transaction_weights is not None:
              for transaction_typename, weight in zip(transaction_typenames, transaction_weights):
                  args.transaction_typename.append(transaction_typename)
                  args.transaction_weight.append(weight)
  
          if class_ids is not None and class_weights is not None:
              for class_id, weight in zip(class_ids, class_weights):
                  args.class_id.append(class_id)
                  args.class_weight.append(weight)
  
          if predict_class_id is not None:
              args.predict_class_id = predict_class_id
  
          func = None
          if find_theta or find_ptdw:
              args.theta_matrix_type = constants.ThetaMatrixType_Dense
              if find_ptdw:
                  args.theta_matrix_type = constants.ThetaMatrixType_DensePtdw
              func = self._lib.ArtmRequestProcessBatchesExternal
          elif not find_theta or find_theta is None:
              func = self._lib.ArtmRequestProcessBatches
  
          result = func(self.master_id, args)
  
          if not find_theta and not find_ptdw:
              return result.theta_matrix
  
          num_rows = len(result.theta_matrix.item_id)
          num_cols = result.theta_matrix.num_topics
          numpy_ndarray = numpy.zeros(shape=(num_rows, num_cols), dtype=numpy.float32)
          self._lib.ArtmCopyRequestedObject(numpy_ndarray)
  
          return result.theta_matrix, numpy_ndarray
function_tokens: def process_batches ( self , pwt , nwt = None , num_document_passes = None , batches_folder = None , batches = None , regularizer_name = None , regularizer_tau = None , class_ids = None , class_weights = None , find_theta = False , transaction_typenames = None , transaction_weights = None , reuse_theta = False , find_ptdw = False , predict_class_id = None , predict_transaction_type = None ) : args = messages . ProcessBatchesArgs ( pwt_source_name = pwt , reuse_theta = reuse_theta ) if nwt is not None : args . nwt_target_name = nwt if batches_folder is not None : for name in os . listdir ( batches_folder ) : _ , extension = os . path . splitext ( name ) if extension == '.batch' : args . batch_filename . append ( os . path . join ( batches_folder , name ) ) if batches is not None : for batch in batches : args . batch_filename . append ( batch ) if num_document_passes is not None : args . num_document_passes = num_document_passes if regularizer_name is not None and regularizer_tau is not None : for name , tau in zip ( regularizer_name , regularizer_tau ) : args . regularizer_name . append ( name ) args . regularizer_tau . append ( tau ) if transaction_typenames is not None and transaction_weights is not None : for transaction_typename , weight in zip ( transaction_typenames , transaction_weights ) : args . transaction_typename . append ( transaction_typename ) args . transaction_weight . append ( weight ) if class_ids is not None and class_weights is not None : for class_id , weight in zip ( class_ids , class_weights ) : args . class_id . append ( class_id ) args . class_weight . append ( weight ) if predict_class_id is not None : args . predict_class_id = predict_class_id func = None if find_theta or find_ptdw : args . theta_matrix_type = constants . ThetaMatrixType_Dense if find_ptdw : args . theta_matrix_type = constants . ThetaMatrixType_DensePtdw func = self . _lib . ArtmRequestProcessBatchesExternal elif not find_theta or find_theta is None : func = self . _lib . ArtmRequestProcessBatches result = func ( self . master_id , args ) if not find_theta and not find_ptdw : return result . theta_matrix num_rows = len ( result . theta_matrix . item_id ) num_cols = result . theta_matrix . num_topics numpy_ndarray = numpy . zeros ( shape = ( num_rows , num_cols ) , dtype = numpy . float32 ) self . _lib . ArtmCopyRequestedObject ( numpy_ndarray ) return result . theta_matrix , numpy_ndarray