示例#1
0
        public static float EvaluationModelOnly(string srcModelPath, string tgtModelPath, out List <string> validationFileLines)
        {
            string validationResultFile = Path.GetRandomFileName();

            Program.Print("Calling external validation process ... ");
            PairScoreEvaluationSet.CallExternalMetricEXE(ParameterSetting.VALIDATE_PROCESS, string.Format("{0} {1} {2}", srcModelPath, tgtModelPath, validationResultFile), validationResultFile);

            Program.Print("Reading validation objective metric  ... ");

            float result = PairScoreEvaluationSet.ReadExternalObjectiveMetric(validationResultFile, out validationFileLines);

            if (File.Exists(validationResultFile))
            {
                File.Delete(validationResultFile);
            }

            return(result);
        }
示例#2
0
        public static EvaluationSet Create(Evaluation_Type type)
        {
            EvaluationSet eval = null;

            switch (type)
            {
            case Evaluation_Type.PairScore:
                eval = new PairScoreEvaluationSet();
                break;

            case Evaluation_Type.MultiRegressionScore:
                eval = new MultiRegressionEvaluationSet();
                break;

            case Evaluation_Type.ClassficationScore:
                eval = new ClassificationEvaluationSet();
                break;

            case Evaluation_Type.PairRegressioinScore:
                eval = new RegressionEvaluationSet();
                break;
            }
            return(eval);
        }