class_docstr: Realize the BackMapping translation matrix which maps the source model's document vector
  to the target model's document vector (old model).
  
  BackMapping translation matrix is used to learn a mapping for two document vector spaces which we
  specify as source document vector and target document vector. The target document vectors are trained
  on a superset corpus of source document vectors; we can incrementally increase the vector in
  the old model through the BackMapping translation matrix.
  
  For details on use, see the tutorial notebook [3]_.
  
  Examples
  --------
  .. sourcecode:: pycon
  
      >>> from gensim.test.utils import datapath
      >>> from gensim.test.test_translation_matrix import read_sentiment_docs
      >>> from gensim.models import Doc2Vec, BackMappingTranslationMatrix
      >>>
      >>> data = read_sentiment_docs(datapath("alldata-id-10.txt"))[:5]
      >>> src_model = Doc2Vec.load(datapath("small_tag_doc_5_iter50"))
      >>> dst_model = Doc2Vec.load(datapath("large_tag_doc_10_iter50"))
      >>>
      >>> model_trans = BackMappingTranslationMatrix(src_model, dst_model)
      >>> trans_matrix = model_trans.train(data)
      >>>
      >>> result = model_trans.infer_vector(dst_model.dv[data[3].tags])
class_docstr_tok: ["Realize","the","BackMapping","translation","matrix","which","maps","the","source","model","'s","document","vector","to","the","target","model","'s","document","vector","(","old","model",")",".","BackMapping","translation","matrix","is","used","to","learn","a","mapping","for","two","document","vector","spaces","which","we","specify","as","source","document","vector","and","target","document","vector",".","The","target","document","vectors","are","trained","on","a","superset","corpus","of","source","document","vectors",";","we","can","incrementally","increase","the","vector","in","the","old","model","through","the","BackMapping","translation","matrix",".","For","details","on","use",",","see","the","tutorial","notebook","[","3","]","_",".","Examples","--","--","--","--","..","sourcecode",":",":","pycon",">",">",">","from","gensim.test.utils","import","datapath",">",">",">","from","gensim.test.test_translation_matrix","import","read_sentiment_docs",">",">",">","from","gensim.models","import","Doc2Vec",",","BackMappingTranslationMatrix",">",">",">",">",">",">","data","=","read_sentiment_docs","(","datapath","(","``","alldata-id-10.txt","''",")",")","[",":5","]",">",">",">","src_model","=","Doc2Vec.load","(","datapath","(","``","small_tag_doc_5_iter50","''",")",")",">",">",">","dst_model","=","Doc2Vec.load","(","datapath","(","``","large_tag_doc_10_iter50","''",")",")",">",">",">",">",">",">","model_trans","=","BackMappingTranslationMatrix","(","src_model",",","dst_model",")",">",">",">","trans_matrix","=","model_trans.train","(","data",")",">",">",">",">",">",">","result","=","model_trans.infer_vector","(","dst_model.dv","[","data","[","3","]",".tags","]",")"]
docstr: Parameters
  ----------
  source_lang_vec : :class:`~gensim.models.doc2vec.Doc2Vec`
      Source Doc2Vec model.
  target_lang_vec : :class:`~gensim.models.doc2vec.Doc2Vec`
      Target Doc2Vec model.
  tagged_docs : list of :class:`~gensim.models.doc2vec.TaggedDocument`, optional.
      Documents that will be used for training, both the source language document vector and
      target language document vector trained on those tagged documents.
  random_state : {None, int, array_like}, optional
      Seed for random state.
docstr_tok: ["Parameters","--","--","--","--","--","source_lang_vec",":",":","class",":","`","~gensim.models.doc2vec.Doc2Vec","`","Source","Doc2Vec","model",".","target_lang_vec",":",":","class",":","`","~gensim.models.doc2vec.Doc2Vec","`","Target","Doc2Vec","model",".","tagged_docs",":","list","of",":","class",":","`","~gensim.models.doc2vec.TaggedDocument","`",",","optional",".","Documents","that","will","be","used","for","training",",","both","the","source","language","document","vector","and","target","language","document","vector","trained","on","those","tagged","documents",".","random_state",":","{","None",",","int",",","array_like","}",",","optional","Seed","for","random","state","."]
code: def __init__(
      self,
      source_lang_vec,
      target_lang_vec,
      tagged_docs=None,
      random_state=None,
  ):
      """
  
      Parameters
      ----------
      source_lang_vec : :class:`~gensim.models.doc2vec.Doc2Vec`
          Source Doc2Vec model.
      target_lang_vec : :class:`~gensim.models.doc2vec.Doc2Vec`
          Target Doc2Vec model.
      tagged_docs : list of :class:`~gensim.models.doc2vec.TaggedDocument`, optional.
          Documents that will be used for training, both the source language document vector and
          target language document vector trained on those tagged documents.
      random_state : {None, int, array_like}, optional
          Seed for random state.
  
      """
      self.tagged_docs = tagged_docs
      self.source_lang_vec = source_lang_vec
      self.target_lang_vec = target_lang_vec
  
      self.random_state = utils.get_random_state(random_state)
      self.translation_matrix = None
  
      if tagged_docs is not None:
          self.train(tagged_docs)
  
imports: import warnings
  from collections import OrderedDict
  import numpy
  from gensim import utils
label_desc: Use image node_id 1 to create a new BackMappingTranslationMatrix object from inherited base classes: utils with example: obj = BackMappingTranslationMatrix(source_lang_vec, target_lang_vec, tagged_docs, random_state)