예제 #1
0
        public void EPIselfTest()
        {
            this.FrameworkController.ProcessCapture(this.PrepareCaptureForProcessing(SnoopersPcaps.Default.app_identification_testM2_cap));


            var appIdentDataSource = this.AppIdentService.CreateAppIdentDataSource(this.L7Conversations);

            var epiEvaluator = new EPIEvaluator(new FeatureSelector());

            epiEvaluator.CreateApplicationProtocolModels(appIdentDataSource.TrainingSet);
            var precMeasure = epiEvaluator.ComputeStatistics(appIdentDataSource.TrainingSet);

            var consoleDefaultColor = Console.ForegroundColor;

            Console.ForegroundColor = consoleDefaultColor;
            Console.WriteLine("################# Procotol model details: ####################");
            epiEvaluator.PrintProtocolModels();

            Console.WriteLine("################# Procotol similarities: ####################");
            epiEvaluator.AgregateProtocolModels();

            Console.WriteLine("################# Summary: ####################");
            precMeasure.PrintResults();
            //applicationProtocolModelEvaluator.PrintCsvProtocolModels();

            this.AppIdentService.SaveStatisticsToxml("testMeasure.xml", precMeasure);
        }
예제 #2
0
        public ApplicationProtocolClassificationStatisticsMeter EpiClasify(
            AppIdentDataSource appIdentDataSource,
            FeatureSelector featureSelector,
            out EPIEvaluator epiEvaluator,
            AppIdentTestContext appIdentTestContext = null)
        {
            //this.CreateDatasetAndTestset(appIdentDataSource, trainingToVerificationRatio, out var trainingSet, out var verificationSet);
            epiEvaluator = new EPIEvaluator(featureSelector);
            epiEvaluator.CreateApplicationProtocolModels(appIdentDataSource.TrainingSet);
            var precMeasure = epiEvaluator.ComputeStatistics(appIdentDataSource.VerificationSet);

            appIdentTestContext?.Save(precMeasure);
            return(precMeasure);
        }