Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/22/18 16:07:05 (7 years ago)
Author:
bburlacu
Message:

#2884: Implement variable impacts calculation and view for classification solutions.

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification
Files:
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionVariableImpactsView.Designer.cs

    r15616 r15638  
    2020#endregion
    2121namespace HeuristicLab.Problems.DataAnalysis.Views {
    22   partial class RegressionSolutionVariableImpactsView {
     22  partial class ClassificationSolutionVariableImpactsView {
    2323    /// <summary>
    2424    /// Required designer variable.
     
    7070      this.dataPartitionComboBox.FormattingEnabled = true;
    7171      this.dataPartitionComboBox.Items.AddRange(new object[] {
    72             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.DataPartitionEnum.Training,
    73             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.DataPartitionEnum.Test,
    74             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.DataPartitionEnum.All});
     72            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.DataPartitionEnum.Training,
     73            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.DataPartitionEnum.Test,
     74            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.DataPartitionEnum.All});
    7575      this.dataPartitionComboBox.Location = new System.Drawing.Point(197, 3);
    7676      this.dataPartitionComboBox.Name = "dataPartitionComboBox";
     
    101101      this.replacementComboBox.FormattingEnabled = true;
    102102      this.replacementComboBox.Items.AddRange(new object[] {
    103             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.ReplacementMethodEnum.Median,
    104             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.ReplacementMethodEnum.Average,
    105             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.ReplacementMethodEnum.Noise,
    106             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.ReplacementMethodEnum.Shuffle});
     103            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.ReplacementMethodEnum.Median,
     104            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.ReplacementMethodEnum.Average,
     105            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.ReplacementMethodEnum.Noise,
     106            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.ReplacementMethodEnum.Shuffle});
    107107      this.replacementComboBox.Location = new System.Drawing.Point(197, 30);
    108108      this.replacementComboBox.Name = "replacementComboBox";
     
    124124      this.factorVarReplComboBox.FormattingEnabled = true;
    125125      this.factorVarReplComboBox.Items.AddRange(new object[] {
    126             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.FactorReplacementMethodEnum.Best,
    127             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.FactorReplacementMethodEnum.Mode,
    128             HeuristicLab.Problems.DataAnalysis.RegressionSolutionVariableImpactsCalculator.FactorReplacementMethodEnum.Shuffle});
     126            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.FactorReplacementMethodEnum.Best,
     127            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.FactorReplacementMethodEnum.Mode,
     128            HeuristicLab.Problems.DataAnalysis.ClassificationSolutionVariableImpactsCalculator.FactorReplacementMethodEnum.Shuffle});
    129129      this.factorVarReplComboBox.Location = new System.Drawing.Point(197, 57);
    130130      this.factorVarReplComboBox.Name = "factorVarReplComboBox";
     
    133133      this.factorVarReplComboBox.SelectedIndexChanged += new System.EventHandler(this.replacementComboBox_SelectedIndexChanged);
    134134      //
    135       // RegressionSolutionVariableImpactsView
     135      // ClassificationSolutionVariableImpactsView
    136136      //
    137137      this.AllowDrop = true;
     
    144144      this.Controls.Add(this.dataPartitionComboBox);
    145145      this.Controls.Add(this.variableImactsArrayView);
    146       this.Name = "RegressionSolutionVariableImpactsView";
     146      this.Name = "ClassificationSolutionVariableImpactsView";
    147147      this.Size = new System.Drawing.Size(369, 365);
    148148      this.ResumeLayout(false);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionVariableImpactsView.cs

    r15616 r15638  
    2424using HeuristicLab.Data;
    2525using HeuristicLab.MainForm;
    26 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
    2726
    2827namespace HeuristicLab.Problems.DataAnalysis.Views {
    2928  [View("Variable Impacts")]
    30   [Content(typeof(IRegressionSolution))]
    31   public partial class RegressionSolutionVariableImpactsView : DataAnalysisSolutionEvaluationView {
     29  [Content(typeof(IClassificationSolution))]
     30  public partial class ClassificationSolutionVariableImpactsView : DataAnalysisSolutionEvaluationView {
    3231
    33     public new IRegressionSolution Content {
    34       get { return (IRegressionSolution)base.Content; }
     32    public new IClassificationSolution Content {
     33      get { return (IClassificationSolution)base.Content; }
    3534      set {
    3635        base.Content = value;
     
    3837    }
    3938
    40     public RegressionSolutionVariableImpactsView()
     39    public ClassificationSolutionVariableImpactsView()
    4140      : base() {
    4241      InitializeComponent();
     
    8382      variableImactsArrayView.Caption = Content.Name + " Variable Impacts";
    8483      var replMethod =
    85          (RegressionSolutionVariableImpactsCalculator.ReplacementMethodEnum)
     84         (ClassificationSolutionVariableImpactsCalculator.ReplacementMethodEnum)
    8685           replacementComboBox.Items[replacementComboBox.SelectedIndex];
    8786      var factorReplMethod =
    88         (RegressionSolutionVariableImpactsCalculator.FactorReplacementMethodEnum)
     87        (ClassificationSolutionVariableImpactsCalculator.FactorReplacementMethodEnum)
    8988          factorVarReplComboBox.Items[factorVarReplComboBox.SelectedIndex];
    9089      var dataPartition =
    91         (RegressionSolutionVariableImpactsCalculator.DataPartitionEnum)dataPartitionComboBox.SelectedItem;
     90        (ClassificationSolutionVariableImpactsCalculator.DataPartitionEnum)dataPartitionComboBox.SelectedItem;
    9291
    9392      Task.Factory.StartNew(() => {
     
    9594          mainForm.AddOperationProgressToView(this, "Calculating variable impacts for " + Content.Name);
    9695
    97           var impacts = RegressionSolutionVariableImpactsCalculator.CalculateImpacts(Content, dataPartition, replMethod, factorReplMethod);
     96          var impacts = ClassificationSolutionVariableImpactsCalculator.CalculateImpacts(Content, dataPartition, replMethod, factorReplMethod);
    9897          var impactArray = new DoubleArray(impacts.Select(i => i.Item2).ToArray());
    9998          impactArray.ElementNames = impacts.Select(i => i.Item1);
Note: See TracChangeset for help on using the changeset viewer.