java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.metric.resultsSimilarity.MatcherSimilarityMetric

public class MatcherSimilarityMetric extends Object
This metric allows to compare system results similarity by calculating the jaccard overlap between alignment results.
Author:
Jan Portisch
  • Field Details

    • LOGGER

      org.slf4j.Logger LOGGER
      Default Logger.
  • Constructor Details

    • MatcherSimilarityMetric

      public MatcherSimilarityMetric()
  • Method Details

    • get

      public MatcherSimilarity get(ExecutionResultSet resultSet, TestCase testCase, Refiner... refiners)
      Obtain the matcher similarity for the given ExecutionResultSet.
      Parameters:
      resultSet - The result set for which the matcher similarity shall be calculated.
      testCase - The test case on whose basis the evaluation shall be performed.
      refiners - The refiners for the comparison operation.
      Returns:
      The similarity between matchers.
    • get

      public MatcherSimilarity get(MatcherSimilarityMetric.CalculationMode mode, ExecutionResultSet resultSet, Track track, Refiner... refiners)
      Obtain the aggregated matcher similarity for the given ExecutionResultSet. Results will be averaged in a micro-average fashion.
      Parameters:
      mode - The mode for the calculation (i.e., micro or macro).
      resultSet - The result set to be used.
      track - The track for which the matcher similarity shall be aggregated.
      refiners - Refiners that apply.
      Returns:
      The similarity between matchers.
    • macroAverageMatcherSimilarity

      private MatcherSimilarity macroAverageMatcherSimilarity(ExecutionResultSet resultSet, Track track, Refiner... refiners)
      Obtain the aggregated matcher similarity for the given ExecutionResultSet. Results will be averaged in a micro-average fashion.
      Parameters:
      resultSet - The result set to be used.
      track - The track for which the matcher similarity shall be aggregated.
      refiners - Refiners that apply.
      Returns:
      The similarity between matchers.
    • microAverageMatcherSimilarity

      private MatcherSimilarity microAverageMatcherSimilarity(ExecutionResultSet resultSet, Track track, Refiner... refiners)
      Obtain the aggregated matcher similarity for the given ExecutionResultSet. Results will be averaged in a micro-average fashion.
      Parameters:
      resultSet - The result set to be used.
      track - The track for which the matcher similarity shall be aggregated.
      refiners - Refiners that apply.
      Returns:
      The similarity between matchers.
    • computeSimilarity

      public static double computeSimilarity(ExecutionResult executionResult_1, ExecutionResult executionResult_2)
      Computes the Jaccard overlap between two system results.
      Parameters:
      executionResult_1 - Result 1.
      executionResult_2 - Result 2.
      Returns:
      Similarity as double.
    • computeSimilarity

      public static double computeSimilarity(Alignment alignment_1, Alignment alignment_2)
      Computes the Jaccard overlap between two alignments.
      Parameters:
      alignment_1 - alignment 1.
      alignment_2 - alignment 2.
      Returns:
      Similarity as double.