Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3855 for trunk/sources


Ignore:
Timestamp:
05/20/10 14:57:11 (15 years ago)
Author:
mkommend
Message:

corrected SVMs in HL3.3 (ticket #1009)

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/SupportVectorMachineModelView.Designer.cs

    r3853 r3855  
    5555      this.textBox.Multiline = true;
    5656      this.textBox.Name = "textBox";
     57      this.textBox.ReadOnly = true;
     58      this.textBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
    5759      this.textBox.Size = new System.Drawing.Size(247, 245);
    5860      this.textBox.TabIndex = 0;
     
    7577    private System.Windows.Forms.TextBox textBox;
    7678
     79
    7780  }
    7881}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/SupportVectorMachineModelView.cs

    r3853 r3855  
    5353    }
    5454
     55    protected override void OnContentChanged() {
     56      base.OnContentChanged();
     57      if (Content == null)
     58        textBox.Text = string.Empty;
     59      else
     60        UpdateTextBox();
     61    }
    5562
    56     #region events
    5763    protected override void RegisterContentEvents() {
    5864      base.RegisterContentEvents();
    5965      Content.Changed += new EventHandler(Content_Changed);
    6066    }
    61 
    6267    protected override void DeregisterContentEvents() {
    6368      base.DeregisterContentEvents();
    6469      Content.Changed -= new EventHandler(Content_Changed);
    6570    }
     71    private void Content_Changed(object sender, EventArgs e) {
     72      UpdateTextBox();
     73    }
    6674
    67     private void Content_Changed(object sender, EventArgs e) {
     75    private void UpdateTextBox() {
    6876      using (MemoryStream s = new MemoryStream()) {
    6977        SupportVectorMachineModel.Export(Content, s);
     
    7381      }
    7482    }
    75 
    76     #endregion
    7783  }
    7884}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/SupportVectorRegressionSolutionView.cs

    r3853 r3855  
    5454    }
    5555
    56 
    57     #region events
     56    protected override void OnContentChanged() {
     57      base.OnContentChanged();
     58      if (Content != null) {
     59        dataPanel.Content = Content.ProblemData;
     60        modelPanel.Content = Content.Model;
     61      } else {
     62        dataPanel.Content = null;
     63        modelPanel.Content = null;
     64      }
     65    }
    5866    protected override void RegisterContentEvents() {
    5967      base.RegisterContentEvents();
    60       Content.ProblemDataChanged += new EventHandler(Content_Changed);
     68      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
    6169    }
    6270
     
    6573    }
    6674
    67     private void Content_Changed(object sender, EventArgs e) {
    68       modelPanel.Content = Content.Model;
     75    private void Content_ProblemDataChanged(object sender, EventArgs e) {
    6976      dataPanel.Content = Content.ProblemData;
    7077    }
    71 
    72     #endregion
    7378  }
    7479}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineUtil.cs

    r3842 r3855  
    4646      for (int row = 0; row < rowCount; row++) {
    4747        tempRow = new List<SVM.Node>();
    48         foreach (var inputVariable in problemData.InputVariables) {
    49           int col = problemData.Dataset.GetVariableIndex(inputVariable.Value);
     48        foreach (var inputVariable in problemData.InputVariables.CheckedItems) {
     49          int col = problemData.Dataset.GetVariableIndex(inputVariable.Value.Value);
    5050          double value = problemData.Dataset[start + row, col];
    5151          if (!double.IsNaN(value)) {
Note: See TracChangeset for help on using the changeset viewer.