class_docstr: Train data loader for NAML model.
  The model require a special type of data format, where each instance contains a label, impresion id, user id,
  the candidate news articles and user's clicked news article. Articles are represented by title words,
  body words, verts and subverts.
  
  Iterator will not load the whole data into memory. Instead, it loads data into memory
  per mini-batch, so that large files can be used as input data.
  
  Attributes:
      col_spliter (str): column spliter in one line.
      ID_spliter (str): ID spliter in one line.
      batch_size (int): the samples num in one batch.
      title_size (int): max word num in news title.
      his_size (int): max clicked news num in user click history.
      npratio (int): negaive and positive ratio used in negative sampling. -1 means no need of negtive sampling.
class_docstr_tok: ["Train","data","loader","for","NAML","model",".","The","model","require","a","special","type","of","data","format",",","where","each","instance","contains","a","label",",","impresion","id",",","user","id",",","the","candidate","news","articles","and","user","'s","clicked","news","article",".","Articles","are","represented","by","title","words",",","body","words",",","verts","and","subverts",".","Iterator","will","not","load","the","whole","data","into","memory",".","Instead",",","it","loads","data","into","memory","per","mini-batch",",","so","that","large","files","can","be","used","as","input","data",".","Attributes",":","col_spliter","(","str",")",":","column","spliter","in","one","line",".","ID_spliter","(","str",")",":","ID","spliter","in","one","line",".","batch_size","(","int",")",":","the","samples","num","in","one","batch",".","title_size","(","int",")",":","max","word","num","in","news","title",".","his_size","(","int",")",":","max","clicked","news","num","in","user","click","history",".","npratio","(","int",")",":","negaive","and","positive","ratio","used","in","negative","sampling",".","-1","means","no","need","of","negtive","sampling","."]
docstr: Convert data into numpy arrays that are good for further model operation.
  
  Args:
      label_list (list): a list of ground-truth labels.
      imp_indexes (list): a list of impression indexes.
      user_indexes (list): a list of user indexes.
      candidate_title_indexes (list): the candidate news titles' words indices.
      click_title_indexes (list): words indices for user's clicked news titles.
  
  Returns:
      dict: A dictionary, containing multiple numpy arrays that are convenient for further operation.
docstr_tok: ["Convert","data","into","numpy","arrays","that","are","good","for","further","model","operation",".","Args",":","label_list","(","list",")",":","a","list","of","ground-truth","labels",".","imp_indexes","(","list",")",":","a","list","of","impression","indexes",".","user_indexes","(","list",")",":","a","list","of","user","indexes",".","candidate_title_indexes","(","list",")",":","the","candidate","news","titles","'","words","indices",".","click_title_indexes","(","list",")",":","words","indices","for","user","'s","clicked","news","titles",".","Returns",":","dict",":","A","dictionary",",","containing","multiple","numpy","arrays","that","are","convenient","for","further","operation","."]
code: def _convert_data(
      self,
      label_list,
      imp_indexes,
      user_indexes,
      candidate_title_indexes,
      click_title_indexes,
  ):
      """Convert data into numpy arrays that are good for further model operation.
  
      Args:
          label_list (list): a list of ground-truth labels.
          imp_indexes (list): a list of impression indexes.
          user_indexes (list): a list of user indexes.
          candidate_title_indexes (list): the candidate news titles' words indices.
          click_title_indexes (list): words indices for user's clicked news titles.
  
      Returns:
          dict: A dictionary, containing multiple numpy arrays that are convenient for further operation.
      """
  
      labels = np.asarray(label_list, dtype=np.float32)
      imp_indexes = np.asarray(imp_indexes, dtype=np.int32)
      user_indexes = np.asarray(user_indexes, dtype=np.int32)
      candidate_title_index_batch = np.asarray(
          candidate_title_indexes, dtype=np.int64
      )
      click_title_index_batch = np.asarray(
          click_title_indexes, dtype=np.int64
      )
      return {
          "impression_index_batch": imp_indexes,
          "user_index_batch": user_indexes,
          "clicked_title_batch": click_title_index_batch,
          "candidate_title_batch": candidate_title_index_batch,
          "labels": labels,
      }
  
file_path: recommenders/recommenders/models/newsrec/io/mind_iterator.py
imports: import tensorflow
  import numpy
  import pickle
  from recommenders.models.deeprec.io.iterator import BaseIterator
  from recommenders.models.newsrec.newsrec_utils import word_tokenize, newsample
label_desc: Use image node_id 7 for calling the MINDIterator obj's underlying member method code with example usage: obj._convert_data(label_list, imp_indexes, user_indexes, candidate_title_indexes, click_title_indexes) and returns: dict