class_docstr: Evaluate a model based on the similarity of the embeddings by calculating the Spearman and Pearson rank correlation
  in comparison to the gold standard labels.
  The metrics are the cosine similarity as well as euclidean and Manhattan distance
  The returned score is the Spearman correlation with a specified metric.
  
  The results are written in a CSV. If a CSV already exists, then values are appended.
class_docstr_tok: ["Evaluate","a","model","based","on","the","similarity","of","the","embeddings","by","calculating","the","Spearman","and","Pearson","rank","correlation","in","comparison","to","the","gold","standard","labels",".","The","metrics","are","the","cosine","similarity","as","well","as","euclidean","and","Manhattan","distance","The","returned","score","is","the","Spearman","correlation","with","a","specified","metric",".","The","results","are","written","in","a","CSV",".","If","a","CSV","already","exists",",","then","values","are","appended","."]
code: def from_input_examples(cls, examples: List[InputExample], **kwargs):
      sentences1 = []
      sentences2 = []
      scores = []
  
      for example in examples:
          sentences1.append(example.texts[0])
          sentences2.append(example.texts[1])
          scores.append(example.label)
      return cls(sentences1, sentences2, scores, **kwargs)
  
file_path: sentence-transformers/sentence_transformers/evaluation/EmbeddingSimilarityEvaluator.py
imports: from .None import SentenceEvaluator, SimilarityFunction
  import logging
  import os
  import csv
  from sklearn.metrics.pairwise import paired_cosine_distances, paired_euclidean_distances, paired_manhattan_distances
  from scipy.stats import pearsonr, spearmanr
  import numpy
  from typing import List
  from ..readers import InputExample
label_desc: Use image node_id 2 for calling the EmbeddingSimilarityEvaluator obj's underlying member method code with example usage: obj.from_input_examples(cls, examples) and returns: cls