Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6256 for trunk/sources


Ignore:
Timestamp:
05/23/11 16:28:50 (14 years ago)
Author:
mkommend
Message:

#1478: Added optimize button in symbolic regression simplifier view.

Location:
trunk/sources
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs

    r5993 r6256  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Drawing;
    2524using System.Linq;
    26 using System.Windows.Forms;
    2725using HeuristicLab.Common;
    28 using HeuristicLab.MainForm.WindowsForms;
     26using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2927using HeuristicLab.Problems.DataAnalysis.Symbolic.Views;
    30 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    3128
    3229namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views {
     
    115112      for (int i = 1; i < sourceTree.Root.SubtreesCount; i++) {
    116113        tempTree.Root.AddSubtree((ISymbolicExpressionTreeNode)sourceTree.Root.GetSubtree(i).Clone());
    117       } 
     114      }
    118115      var start = tempTree.Root.GetSubtree(0);
    119116      while (start.SubtreesCount > 0) start.RemoveSubtree(0);
     
    134131      }
    135132    }
     133
     134    protected override void btnOptimizeConstants_Click(object sender, EventArgs e) {
     135
     136    }
    136137  }
    137138}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj

    r5830 r6256  
    165165      <Name>HeuristicLab.MainForm-3.3</Name>
    166166    </ProjectReference>
     167    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
     168      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
     169      <Name>HeuristicLab.Operators-3.3</Name>
     170    </ProjectReference>
    167171    <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj">
    168172      <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.Designer.cs

    r5809 r6256  
    5353      this.Name = "InteractiveSymbolicRegressionSolutionSimplifierView";
    5454      this.Size = new System.Drawing.Size(564, 348);
     55      this.btnOptimizeConstants.Enabled = true;
    5556      this.ResumeLayout(false);
    5657    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs

    r5993 r6256  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Drawing;
    2524using System.Linq;
    26 using System.Windows.Forms;
    2725using HeuristicLab.Common;
    28 using HeuristicLab.MainForm.WindowsForms;
     26using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2927using HeuristicLab.Problems.DataAnalysis.Symbolic.Views;
    30 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    3128
    3229namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views {
     
    123120      }
    124121    }
     122
     123    protected override void btnOptimizeConstants_Click(object sender, EventArgs e) {
     124      SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(Content.Model.Interpreter, Content.Model.SymbolicExpressionTree, Content.ProblemData, Content.ProblemData.TrainingIndizes, 0, 10);
     125      UpdateModel(Content.Model.SymbolicExpressionTree);
     126    }
    125127  }
    126128}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj

    r5809 r6256  
    109109  <ItemGroup>
    110110    <Compile Include="MultiObjective\SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer.cs" />
     111    <Compile Include="SingleObjective\SymbolicRegressionConstantOptimizationEvaluator.cs" />
    111112    <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs" />
    112113    <Compile Include="SymbolicRegressionModel.cs" />
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs

    r5809 r6256  
    4949      this.splitContainer = new System.Windows.Forms.SplitContainer();
    5050      this.grpSimplify = new System.Windows.Forms.GroupBox();
     51      this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
    5152      this.btnSimplify = new System.Windows.Forms.Button();
     53      this.btnOptimizeConstants = new System.Windows.Forms.Button();
    5254      this.grpViewHost = new System.Windows.Forms.GroupBox();
     55      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
    5356      this.splitContainer.Panel1.SuspendLayout();
    5457      this.splitContainer.Panel2.SuspendLayout();
    5558      this.splitContainer.SuspendLayout();
    5659      this.grpSimplify.SuspendLayout();
     60      this.flowLayoutPanel.SuspendLayout();
    5761      this.grpViewHost.SuspendLayout();
    5862      this.SuspendLayout();
     
    6064      // treeChart
    6165      //
    62       this.treeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    63                   | System.Windows.Forms.AnchorStyles.Left)
    64                   | System.Windows.Forms.AnchorStyles.Right)));
     66      this.treeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     67            | System.Windows.Forms.AnchorStyles.Left)
     68            | System.Windows.Forms.AnchorStyles.Right)));
    6569      this.treeChart.BackgroundColor = System.Drawing.Color.White;
    6670      this.treeChart.LineColor = System.Drawing.Color.Black;
    6771      this.treeChart.Location = new System.Drawing.Point(6, 16);
    6872      this.treeChart.Name = "treeChart";
    69       this.treeChart.Size = new System.Drawing.Size(201, 297);
     73      this.treeChart.Size = new System.Drawing.Size(201, 291);
    7074      this.treeChart.Spacing = 5;
    7175      this.treeChart.TabIndex = 0;
     
    7680      // viewHost
    7781      //
    78       this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    79                   | System.Windows.Forms.AnchorStyles.Left)
    80                   | System.Windows.Forms.AnchorStyles.Right)));
     82      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     83            | System.Windows.Forms.AnchorStyles.Left)
     84            | System.Windows.Forms.AnchorStyles.Right)));
    8185      this.viewHost.Caption = "View";
    8286      this.viewHost.Content = null;
     
    8791      this.viewHost.Size = new System.Drawing.Size(335, 326);
    8892      this.viewHost.TabIndex = 0;
     93      this.viewHost.ViewsLabelVisible = true;
    8994      this.viewHost.ViewType = null;
    9095      //
     
    108113      // grpSimplify
    109114      //
    110       this.grpSimplify.Controls.Add(this.btnSimplify);
     115      this.grpSimplify.Controls.Add(this.flowLayoutPanel);
    111116      this.grpSimplify.Controls.Add(this.treeChart);
    112117      this.grpSimplify.Dock = System.Windows.Forms.DockStyle.Fill;
     
    118123      this.grpSimplify.Text = "Simplify";
    119124      //
     125      // flowLayoutPanel
     126      //
     127      this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
     128            | System.Windows.Forms.AnchorStyles.Right)));
     129      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
     130      this.flowLayoutPanel.Controls.Add(this.btnOptimizeConstants);
     131      this.flowLayoutPanel.Location = new System.Drawing.Point(6, 313);
     132      this.flowLayoutPanel.Name = "flowLayoutPanel";
     133      this.flowLayoutPanel.Size = new System.Drawing.Size(204, 29);
     134      this.flowLayoutPanel.TabIndex = 2;
     135      this.flowLayoutPanel.WrapContents = false;
     136      //
    120137      // btnSimplify
    121138      //
    122       this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
    123                   | System.Windows.Forms.AnchorStyles.Right)));
    124       this.btnSimplify.Location = new System.Drawing.Point(6, 319);
     139      this.btnSimplify.Location = new System.Drawing.Point(3, 3);
    125140      this.btnSimplify.Name = "btnSimplify";
    126       this.btnSimplify.Size = new System.Drawing.Size(201, 23);
     141      this.btnSimplify.Size = new System.Drawing.Size(95, 23);
    127142      this.btnSimplify.TabIndex = 1;
    128143      this.btnSimplify.Text = "Simplify";
    129144      this.btnSimplify.UseVisualStyleBackColor = true;
    130145      this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
     146      //
     147      // btnOptimizeConstants
     148      //
     149      this.btnOptimizeConstants.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     150      this.btnOptimizeConstants.Enabled = false;
     151      this.btnOptimizeConstants.Location = new System.Drawing.Point(104, 3);
     152      this.btnOptimizeConstants.Name = "btnOptimizeConstants";
     153      this.btnOptimizeConstants.Size = new System.Drawing.Size(97, 23);
     154      this.btnOptimizeConstants.TabIndex = 2;
     155      this.btnOptimizeConstants.Text = "Optimize";
     156      this.btnOptimizeConstants.UseVisualStyleBackColor = true;
     157      this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
    131158      //
    132159      // grpViewHost
     
    141168      this.grpViewHost.Text = "Details";
    142169      //
    143       // InteractiveSymbolicRegressionSolutionSimplifierView
     170      // InteractiveSymbolicDataAnalysisSolutionSimplifierView
    144171      //
    145172      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    146173      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    147174      this.Controls.Add(this.splitContainer);
    148       this.Name = "InteractiveSymbolicRegressionSolutionSimplifierView";
     175      this.Name = "InteractiveSymbolicDataAnalysisSolutionSimplifierView";
    149176      this.Size = new System.Drawing.Size(564, 348);
    150177      this.splitContainer.Panel1.ResumeLayout(false);
    151178      this.splitContainer.Panel2.ResumeLayout(false);
     179      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
    152180      this.splitContainer.ResumeLayout(false);
    153181      this.grpSimplify.ResumeLayout(false);
     182      this.flowLayoutPanel.ResumeLayout(false);
    154183      this.grpViewHost.ResumeLayout(false);
    155184      this.ResumeLayout(false);
     
    165194    private System.Windows.Forms.GroupBox grpViewHost;
    166195    private System.Windows.Forms.Button btnSimplify;
     196    private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
     197    protected System.Windows.Forms.Button btnOptimizeConstants;
    167198  }
    168199}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r6113 r6256  
    212212      UpdateModel(simplifiedExpressionTree);
    213213    }
     214
     215    protected abstract void btnOptimizeConstants_Click(object sender, EventArgs e);
    214216  }
    215217}
Note: See TracChangeset for help on using the changeset viewer.