18 using TraceLabSDK.Types;
19 using TraceLabSDK.Types.Contests;
21 namespace TraceLab.Components.DevelopmentKit.Metrics.Traceability
30 private const string _name =
"Recall (ranklist granularity)";
31 private const string _description =
"Recall measures the fraction of correctly retrieved documents among the total correct documents. This metric is computed on the overall ranked list.";
36 public override string Name
44 public override string Description
46 get {
return _description; }
49 private TLSimilarityMatrix _matrix;
50 private TLSimilarityMatrix _oracle;
61 _matrix = candidateMatrix;
62 _oracle = answerMatrix;
70 _oracle.Threshold = 0;
72 foreach (TLSingleLink link
in _matrix.AllLinks)
74 if (_oracle.IsLinkAboveThreshold(link.SourceArtifactId, link.TargetArtifactId))
79 Results =
new TraceLabSDK.SerializableDictionary<string,
double>();
80 Results.Add(
"Recall", correct / (
double)_oracle.Count);
89 BoxSummaryData data =
new BoxSummaryData(Name, Description);
90 data.AddPoint(
new BoxPlotPoint(Results.Values.ToArray()));