public ProcessingWindow(SubjectiveSystem system, ObserverData observerData, ProcessingMethod processingMethod) { this.system = system; this.observerData = observerData; this.processingMethod = processingMethod; InitializeComponent(); }
public void Infere(ObserverData observerData) { var evaluator = new Evaluator(); IList <EvaluationResult> evaluationResults = evaluator.Evaluate(observerData.TrainingData); observerData.SetEvaluationResults(evaluationResults); }
public void AddObserver(string observerName) { var observerData = new ObserverData { ObserverName = observerName, TrainingData = PrepareTrainingData() }; ObserversData.Add(observerData); observerData.CheckTrainingStatus(); }
public void AddObserver(string observerName) { var observerData = new ObserverData { ObserverName = observerName, TrainingData = PrepareTrainingData() }; ObserversData.Add(observerData); observerData.CheckTrainingStatus(); }
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(); }
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(); }
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(); }
public void Infere(ObserverData observerData) { var evaluator = new Evaluator(); IList<EvaluationResult> evaluationResults = evaluator.Evaluate(observerData.TrainingData); observerData.SetEvaluationResults(evaluationResults); }
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(); }