示例#1
0
        public override void Compute()
        {
            TLSimilarityMatrix sims          = (TLSimilarityMatrix)Workspace.Load("Similarities");
            TLSimilarityMatrix relationships = (TLSimilarityMatrix)Workspace.Load("StructuralRelationships");
            TLSimilarityMatrix feedback      = (TLSimilarityMatrix)Workspace.Load("DeveloperFeedback");

            Workspace.Store("UD-CSTI_Similarities", UDCSTI.Compute(sims, relationships, feedback));
        }
        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();
        }