class_docstr: Computes the mean squared error (x100) between the computed sentence embedding and some target sentence embedding.
  
  :param dataframe: It must have the following format. Rows contains different, parallel sentences.
      Columns are the respective language codes::
  
          [{'en': 'My sentence', 'es': 'Sentence in Spanisch', 'fr': 'Sentence in French'...},
           {'en': 'My second sentence', ...}]
  :param combinations: Must be of the format ``[('en', 'es'), ('en', 'fr'), ...]``.
      First entry in a tuple is the source language. The sentence in the respective language will be fetched from
      the dataframe and passed to the teacher model. Second entry in a tuple the the target language. Sentence
      will be fetched from the dataframe and passed to the student model
class_docstr_tok: ["Computes","the","mean","squared","error","(","x100",")","between","the","computed","sentence","embedding","and","some","target","sentence","embedding",".",":","param","dataframe",":","It","must","have","the","following","format",".","Rows","contains","different",",","parallel","sentences",".","Columns","are","the","respective","language","codes",":",":","[","{","'en","'",":","'My","sentence","'",",","'es","'",":","'Sentence","in","Spanisch","'",",","'fr","'",":","'Sentence","in","French","'","...","}",",","{","'en","'",":","'My","second","sentence","'",",","...","}","]",":","param","combinations",":","Must","be","of","the","format","``","[","(","'en","'",",","'es","'",")",",","(","'en","'",",","'fr","'",")",",","...","]","``",".","First","entry","in","a","tuple","is","the","source","language",".","The","sentence","in","the","respective","language","will","be","fetched","from","the","dataframe","and","passed","to","the","teacher","model",".","Second","entry","in","a","tuple","the","the","target","language",".","Sentence","will","be","fetched","from","the","dataframe","and","passed","to","the","student","model"]
code: def __init__(
      self,
      dataframe: List[Dict[str, str]],
      teacher_model: SentenceTransformer,
      combinations: List[Tuple[str, str]],
      batch_size: int = 8,
      name="",
      write_csv: bool = True,
  ):
      self.combinations = combinations
      self.name = name
      self.batch_size = batch_size
  
      if name:
          name = "_" + name
  
      self.csv_file = "mse_evaluation" + name + "_results.csv"
      self.csv_headers = ["epoch", "steps"]
      self.write_csv = write_csv
      self.data = {}
  
      logger.info("Compute teacher embeddings")
      all_source_sentences = set()
      for src_lang, trg_lang in self.combinations:
          src_sentences = []
          trg_sentences = []
  
          for row in dataframe:
              if (
                  row[src_lang].strip() != ""
                  and row[trg_lang].strip() != ""
              ):
                  all_source_sentences.add(row[src_lang])
                  src_sentences.append(row[src_lang])
                  trg_sentences.append(row[trg_lang])
  
          self.data[(src_lang, trg_lang)] = (
              src_sentences,
              trg_sentences,
          )
          self.csv_headers.append("{}-{}".format(src_lang, trg_lang))
  
      all_source_sentences = list(all_source_sentences)
      all_src_embeddings = teacher_model.encode(
          all_source_sentences, batch_size=self.batch_size
      )
      self.teacher_embeddings = {
          sent: emb
          for sent, emb in zip(all_source_sentences, all_src_embeddings)
      }
  
file_path: sentence-transformers/sentence_transformers/evaluation/MSEEvaluatorFromDataFrame.py
imports: from sentence_transformers.evaluation import SentenceEvaluator
  from sentence_transformers import SentenceTransformer
  from typing import List, Tuple, Dict
  import numpy
  import logging
  import os
  import csv
label_desc: Use image node_id 1 to create a new MSEEvaluatorFromDataFrame object from inherited base classes: SentenceEvaluator with example: obj = MSEEvaluatorFromDataFrame(dataframe, teacher_model, combinations, batch_size, name, write_csv)