- Timestamp:
- 08/08/11 13:15:23 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionModelView.cs
r6613 r6642 19 19 */ 20 20 #endregion 21 21 using System.Windows.Forms; 22 using HeuristicLab.Core.Views; 23 using HeuristicLab.MainForm; 24 using HeuristicLab.MainForm.WindowsForms; 22 25 23 26 namespace HeuristicLab.Problems.DataAnalysis.Views { 24 #region License Information 25 /* HeuristicLab 26 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 27 * 28 * This file is part of HeuristicLab. 29 * 30 * HeuristicLab is free software: you can redistribute it and/or modify 31 * it under the terms of the GNU General Public License as published by 32 * the Free Software Foundation, either version 3 of the License, or 33 * (at your option) any later version. 34 * 35 * HeuristicLab is distributed in the hope that it will be useful, 36 * but WITHOUT ANY WARRANTY; without even the implied warranty of 37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 38 * GNU General Public License for more details. 39 * 40 * You should have received a copy of the GNU General Public License 41 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 42 */ 43 #endregion 44 using System.Windows.Forms; 45 using HeuristicLab.Core; 46 using HeuristicLab.Core.Views; 47 using HeuristicLab.MainForm; 48 using HeuristicLab.MainForm.WindowsForms; 27 [View("Ensemble Solutions")] 28 [Content(typeof(ClassificationEnsembleSolution), false)] 29 internal sealed partial class ClassificationEnsembleSolutionModelView : DataAnalysisSolutionEvaluationView { 30 private ModelsView view; 49 31 50 [View("Ensemble Solutions")]51 [Content(typeof(IItemCollection<IClassificationSolution>), false)]52 internal sealed partial class ClassificationEnsembleSolutionModelView : ItemCollectionView<IClassificationSolution> {53 32 public ClassificationEnsembleSolutionModelView() { 54 33 InitializeComponent(); 34 view = new ModelsView(); 35 view.Dock = DockStyle.Fill; 36 Controls.Add(view); 55 37 } 56 38 57 protected override void SetEnabledStateOfControls() { 58 base.SetEnabledStateOfControls(); 59 addButton.Enabled = Content != null && !Content.IsReadOnly && !Locked; 60 removeButton.Enabled = Content != null && !Content.IsReadOnly && !Locked && itemsListView.SelectedItems.Count > 0; 61 itemsListView.Enabled = Content != null; 62 detailsGroupBox.Enabled = Content != null && itemsListView.SelectedItems.Count == 1; 39 public new ClassificationEnsembleSolution Content { 40 get { return (ClassificationEnsembleSolution)base.Content; } 41 set { base.Content = value; } 42 } 43 44 protected override void OnContentChanged() { 45 base.OnContentChanged(); 46 if (Content != null) 47 view.Content = Content.ClassificationSolutions; 48 else 49 view.Content = null; 50 } 51 52 public override System.Drawing.Image ViewImage { 53 get { return HeuristicLab.Common.Resources.VSImageLibrary.Properties; } 54 } 55 56 private class ModelsView : ItemCollectionView<IClassificationSolution> { 57 protected override void SetEnabledStateOfControls() { 58 base.SetEnabledStateOfControls(); 59 addButton.Enabled = Content != null && !Content.IsReadOnly && !Locked; 60 removeButton.Enabled = Content != null && !Content.IsReadOnly && !Locked && itemsListView.SelectedItems.Count > 0; 61 itemsListView.Enabled = Content != null; 62 detailsGroupBox.Enabled = Content != null && itemsListView.SelectedItems.Count == 1; 63 } 63 64 } 64 65 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs
r6520 r6642 24 24 using System.Linq; 25 25 using System.Windows.Forms; 26 using HeuristicLab.Core.Views;27 26 using HeuristicLab.MainForm; 28 27 using HeuristicLab.MainForm.WindowsForms; … … 31 30 [View("Confusion Matrix")] 32 31 [Content(typeof(IClassificationSolution))] 33 public partial class ClassificationSolutionConfusionMatrixView : ItemView, IClassificationSolutionEvaluationView {32 public partial class ClassificationSolutionConfusionMatrixView : DataAnalysisSolutionEvaluationView { 34 33 private const string TrainingSamples = "Training"; 35 34 private const string TestSamples = "Test"; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs
r6255 r6642 22 22 using System.Linq; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Core.Views;25 24 using HeuristicLab.Data; 26 25 using HeuristicLab.Data.Views; … … 31 30 [View("Estimated Class Values")] 32 31 [Content(typeof(IClassificationSolution))] 33 public partial class ClassificationSolutionEstimatedClassValuesView : ItemView, IClassificationSolutionEvaluationView {32 public partial class ClassificationSolutionEstimatedClassValuesView : DataAnalysisSolutionEvaluationView { 34 33 private const string TARGETVARIABLE_SERIES_NAME = "Target Variable"; 35 34 private const string ESTIMATEDVALUES_SERIES_NAME = "Estimated Class Values (all)"; … … 39 38 public new IClassificationSolution Content { 40 39 get { return (IClassificationSolution)base.Content; } 41 set { 42 base.Content = value; 43 } 40 set { base.Content = value; } 44 41 } 45 42 46 pr ivateStringConvertibleMatrixView matrixView;43 protected StringConvertibleMatrixView matrixView; 47 44 48 45 public ClassificationSolutionEstimatedClassValuesView() … … 82 79 } 83 80 84 pr ivatevoid UpdateEstimatedValues() {81 protected virtual void UpdateEstimatedValues() { 85 82 if (InvokeRequired) Invoke((Action)UpdateEstimatedValues); 86 83 else { … … 111 108 112 109 matrix = new StringMatrix(values); 113 matrix.ColumnNames = new string[] { "Id", TARGETVARIABLE_SERIES_NAME, ESTIMATEDVALUES_SERIES_NAME, ESTIMATEDVALUES_TRAINING_SERIES_NAME, ESTIMATEDVALUES_TEST_SERIES_NAME };110 matrix.ColumnNames = new string[] { "Id", TARGETVARIABLE_SERIES_NAME, ESTIMATEDVALUES_SERIES_NAME, ESTIMATEDVALUES_TRAINING_SERIES_NAME, ESTIMATEDVALUES_TEST_SERIES_NAME }; 114 111 matrix.SortableView = true; 115 112 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs
r5975 r6642 28 28 using System.Windows.Forms.DataVisualization.Charting; 29 29 using HeuristicLab.Common; 30 using HeuristicLab.Core.Views;31 30 using HeuristicLab.MainForm; 32 31 using HeuristicLab.MainForm.WindowsForms; … … 34 33 [View("ROC Curves")] 35 34 [Content(typeof(IDiscriminantFunctionClassificationSolution))] 36 public partial class DiscriminantFunctionClassificationRocCurvesView : ItemView, IDiscriminantFunctionClassificationSolutionEvaluationView {35 public partial class DiscriminantFunctionClassificationRocCurvesView : DataAnalysisSolutionEvaluationView { 37 36 private const string xAxisTitle = "False Positive Rate"; 38 37 private const string yAxisTitle = "True Positive Rate"; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionEstimatedClassValuesView.cs
r6411 r6642 22 22 using System.Linq; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Core.Views;25 24 using HeuristicLab.Data; 26 using HeuristicLab.Data.Views;27 25 using HeuristicLab.MainForm; 28 26 using HeuristicLab.MainForm.WindowsForms; … … 31 29 [View("Estimated Class Values")] 32 30 [Content(typeof(IDiscriminantFunctionClassificationSolution))] 33 public partial class DiscriminantFunctionClassificationSolutionEstimatedClassValuesView : ItemView, IDiscriminantFunctionClassificationSolutionEvaluationView {31 public partial class DiscriminantFunctionClassificationSolutionEstimatedClassValuesView : ClassificationSolutionEstimatedClassValuesView { 34 32 private const string TargetClassValuesSeriesname = "TargetVariable"; 35 33 private const string EstimatedClassValuesSeriesName = "EstimatedClassValues"; … … 38 36 public new IDiscriminantFunctionClassificationSolution Content { 39 37 get { return (IDiscriminantFunctionClassificationSolution)base.Content; } 40 set { 41 base.Content = value; 42 } 38 set { base.Content = value; } 43 39 } 44 45 private StringConvertibleMatrixView matrixView;46 40 47 41 public DiscriminantFunctionClassificationSolutionEstimatedClassValuesView() 48 42 : base() { 49 43 InitializeComponent(); 50 matrixView = new StringConvertibleMatrixView();51 matrixView.ShowRowsAndColumnsTextBox = false;52 matrixView.ShowStatisticalInformation = false;53 matrixView.Dock = DockStyle.Fill;54 this.Controls.Add(matrixView);55 44 } 56 45 57 #region events 58 protected override void RegisterContentEvents() { 59 base.RegisterContentEvents(); 60 Content.ModelChanged += new EventHandler(Content_ModelChanged); 61 Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged); 62 } 63 64 protected override void DeregisterContentEvents() { 65 base.DeregisterContentEvents(); 66 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 67 Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged); 68 } 69 70 private void Content_ProblemDataChanged(object sender, EventArgs e) { 71 OnContentChanged(); 72 } 73 74 private void Content_ModelChanged(object sender, EventArgs e) { 75 OnContentChanged(); 76 } 77 78 protected override void OnContentChanged() { 79 base.OnContentChanged(); 80 UpdateEstimatedValues(); 81 } 82 83 private void UpdateEstimatedValues() { 46 protected override void UpdateEstimatedValues() { 84 47 if (InvokeRequired) Invoke((Action)UpdateEstimatedValues); 85 48 else { … … 105 68 } 106 69 } 107 #endregion108 70 } 109 71 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs
r5975 r6642 27 27 using System.Windows.Forms.DataVisualization.Charting; 28 28 using HeuristicLab.Common; 29 using HeuristicLab.Core.Views;30 29 using HeuristicLab.MainForm; 31 30 using HeuristicLab.MainForm.WindowsForms; … … 34 33 [View("Classification Threshold")] 35 34 [Content(typeof(IDiscriminantFunctionClassificationSolution), true)] 36 public sealed partial class DiscriminantFunctionClassificationSolutionThresholdView : ItemView, IDiscriminantFunctionClassificationSolutionEvaluationView {35 public sealed partial class DiscriminantFunctionClassificationSolutionThresholdView : DataAnalysisSolutionEvaluationView { 37 36 private const double TrainingAxisValue = 0.0; 38 37 private const double TestAxisValue = 10.0;
Note: See TracChangeset
for help on using the changeset viewer.