Exemplo n.º 1
0
 public ProcessingWindow(SubjectiveSystem system, ObserverData observerData, ProcessingMethod processingMethod)
 {
     this.system = system;
     this.observerData = observerData;
     this.processingMethod = processingMethod;
     InitializeComponent();
 }
Exemplo n.º 2
0
        public void Infere(ObserverData observerData)
        {
            var evaluator = new Evaluator();
            IList <EvaluationResult> evaluationResults = evaluator.Evaluate(observerData.TrainingData);

            observerData.SetEvaluationResults(evaluationResults);
        }
Exemplo n.º 3
0
        public void AddObserver(string observerName)
        {
            var observerData = new ObserverData
                {
                    ObserverName = observerName,
                    TrainingData = PrepareTrainingData()
                };

            ObserversData.Add(observerData);
            observerData.CheckTrainingStatus();
        }
Exemplo n.º 4
0
        public void AddObserver(string observerName)
        {
            var observerData = new ObserverData
            {
                ObserverName = observerName,
                TrainingData = PrepareTrainingData()
            };

            ObserversData.Add(observerData);
            observerData.CheckTrainingStatus();
        }
Exemplo n.º 5
0
        public void ResetData(ObserverData observerData)
        {
            foreach (TrainingData data in observerData.TrainingData)
            {
                data.UserScore   = null;
                data.SystemScore = null;
            }

            observerData.EvaluationDone = false;
            observerData.CheckTrainingStatus();
            observerData.TrainingData = PrepareTrainingData();
        }
Exemplo n.º 6
0
        public Bitmap ProcessImage(Bitmap image, ObserverData observerData, ProcessingMethod processingMethod)
        {
            if (processingMethod == ProcessingMethod.UseAlgorithmWithHighestScore)
            {
                string bestAlgorithm =
                    observerData.EvaluationResults.OrderByDescending(x => x.AlgorithScore).First().AlgorithCustomName;
                AlgorithmInfo algorithmInfo = this.Algorithms.Where(x => x.CustomName == bestAlgorithm).Single();
                var           algorithm     = AppFacade.DI.Container.Resolve <IAlgorithm>(algorithmInfo.AlgorithName);
                algorithm.SetParameters(algorithmInfo.Parameters);
                return(SimpleProcessing(image, algorithm));
            }
            if (processingMethod == ProcessingMethod.AlgorithmsFusion)
            {
                return(FusionProcessing(image, this.Algorithms, observerData.EvaluationResults));
            }

            throw new NotSupportedException();
        }
Exemplo n.º 7
0
        public Bitmap ProcessImage(Bitmap image, ObserverData observerData, ProcessingMethod processingMethod)
        {
            if (processingMethod == ProcessingMethod.UseAlgorithmWithHighestScore)
            {
                string bestAlgorithm =
                    observerData.EvaluationResults.OrderByDescending(x => x.AlgorithScore).First().AlgorithCustomName;
                AlgorithmInfo algorithmInfo = this.Algorithms.Where(x => x.CustomName == bestAlgorithm).Single();
                var algorithm = AppFacade.DI.Container.Resolve<IAlgorithm>(algorithmInfo.AlgorithName);
                algorithm.SetParameters(algorithmInfo.Parameters);
                return SimpleProcessing(image, algorithm);
            }
            if (processingMethod == ProcessingMethod.AlgorithmsFusion)
            {
                return FusionProcessing(image, this.Algorithms, observerData.EvaluationResults);
            }

            throw new NotSupportedException();
        }
Exemplo n.º 8
0
 public void Infere(ObserverData observerData)
 {
     var evaluator = new Evaluator();
     IList<EvaluationResult> evaluationResults = evaluator.Evaluate(observerData.TrainingData);
     observerData.SetEvaluationResults(evaluationResults);
 }
Exemplo n.º 9
0
        public void ResetData(ObserverData observerData)
        {
            foreach (TrainingData data in observerData.TrainingData)
            {
                data.UserScore = null;
                data.SystemScore = null;
            }

            observerData.EvaluationDone = false;
            observerData.CheckTrainingStatus();
            observerData.TrainingData = PrepareTrainingData();
        }