public override void Compute() { TLSimilarityMatrix sims = (TLSimilarityMatrix)Workspace.Load("Similarities"); TLSimilarityMatrix oracle = (TLSimilarityMatrix)Workspace.Load("Oracle"); Workspace.Store("DataSetPairs", OverallMetricsComputation.ComputeAll(sims, oracle)); }
private static void MyMetrics(ref Info info, string output, TLSimilarityMatrix matrix, TLSimilarityMatrix oracle) { DataSetPairsCollection metrics = OverallMetricsComputation.ComputeAll(matrix, oracle); TextWriter dataFile = File.CreateText(output); for (int i = 0, j = 10; i < metrics.Count; i++, j += 10) { dataFile.WriteLine("{0} {1}", j, metrics[i].PrecisionData[0].Value); } dataFile.Flush(); dataFile.Close(); }
public static void Run(ref Info info) { TLSimilarityMatrix vsm = Similarities.Import(info.ResultsDirectory + @"\CSMRTools\RoccoResults\EasyClinic UC-CC.VSM.sims"); TLSimilarityMatrix oracle = Oracle.Import(info.ResultsDirectory + @"\CSMRTools\RoccoResults\EasyClinic UC-CC.oracle"); TLSimilarityMatrix usage = Oracle.Import(info.ResultsDirectory + @"\CSMRTools\RoccoResults\EasyClinic UC-CC.relationships"); TLSimilarityMatrix udcsti = UDCSTI.Compute(vsm, usage, oracle); Similarities.Export(udcsti, info.ResultsDirectory + @"\CSMRTools\RoccoResults\EasyClinic UC-CC.VSM_UDCSTI.MYsims"); DataSetPairsCollection metrics = OverallMetricsComputation.ComputeAll(udcsti, oracle); TextWriter dataFile = File.CreateText(info.ResultsDirectory + @"\CSMRTools\RoccoResults\EasyClinic UC-CC.VSM_UDCSTI.MYsims.metrics"); for (int i = 0, j = 10; i < metrics.Count; i++, j += 10) { dataFile.WriteLine("{0} {1}", j, metrics[i].PrecisionData[0].Value); } dataFile.Flush(); dataFile.Close(); }