- Timestamp:
- 07/07/14 15:33:56 (10 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views
- Property svn:mergeinfo changed
/branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views (added) merged: 10538,10854,10869,10878-10880,10925,11009,11011,11068,11070,11098
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.Designer.cs
r10541 r11114 19 19 */ 20 20 #endregion 21 22 21 23 22 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views { … … 49 48 this.exportFileDialog = new System.Windows.Forms.SaveFileDialog(); 50 49 this.btnSimplify = new System.Windows.Forms.Button(); 50 this.transformModelButton = new System.Windows.Forms.Button(); 51 51 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 52 52 this.splitContainer.Panel1.SuspendLayout(); … … 61 61 this.flowLayoutPanel.Controls.Add(this.btnSimplify); 62 62 this.flowLayoutPanel.Controls.Add(this.exportButton); 63 this.flowLayoutPanel.Controls.Add(this.transformModelButton); 63 64 // 64 65 // btnSimplify … … 90 91 this.toolTip.SetToolTip(this.exportButton, "Exports the symbolic regression solution to Excel."); 91 92 // 93 // transformModelButton 94 // 95 this.transformModelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); 96 this.transformModelButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Event; 97 this.transformModelButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 98 this.transformModelButton.Name = "transformModelButton"; 99 this.transformModelButton.Size = new System.Drawing.Size(135, 23); 100 this.transformModelButton.TabIndex = 9; 101 this.transformModelButton.Text = "Backtransform Model"; 102 this.transformModelButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 103 this.transformModelButton.UseVisualStyleBackColor = true; 104 this.transformModelButton.Click += new System.EventHandler(this.transformModelButton_Click); 105 this.toolTip.SetToolTip(this.transformModelButton, "Backtransform model based on the stored transformations."); 106 // 92 107 // SymbolicRegressionSolutionView 93 108 // … … 108 123 protected System.Windows.Forms.Button exportButton; 109 124 protected System.Windows.Forms.Button btnSimplify; 125 protected System.Windows.Forms.Button transformModelButton; 110 126 } 111 127 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs
r11093 r11114 45 45 btnSimplify.Enabled = Content != null && !Locked && Content.ProblemData.TrainingIndices.Any(); // simplification is only possible if there are trainings samples 46 46 exportButton.Enabled = Content != null && !Locked; 47 transformModelButton.Visible = Content != null && Content.ProblemData.Transformations.Any(); 48 transformModelButton.Enabled = Content != null && !Locked; 47 49 } 48 50 49 51 private void btn_SimplifyModel_Click(object sender, EventArgs e) { 50 InteractiveSymbolicRegressionSolutionSimplifierViewview = new InteractiveSymbolicRegressionSolutionSimplifierView();52 var view = new InteractiveSymbolicRegressionSolutionSimplifierView(); 51 53 view.Content = (SymbolicRegressionSolution)this.Content.Clone(); 52 54 view.Show(); … … 57 59 exportFileDialog.Filter = exporter.FileTypeFilter; 58 60 if (exportFileDialog.ShowDialog(this) == DialogResult.OK) { 59 60 61 var name = exportFileDialog.FileName; 61 62 using (BackgroundWorker bg = new BackgroundWorker()) { … … 67 68 } 68 69 } 70 71 private void transformModelButton_Click(object sender, EventArgs e) { 72 var mapper = new TransformationToSymbolicTreeMapper(); 73 var transformator = new SymbolicExpressionTreeBacktransformator(mapper); 74 75 var transformations = Content.ProblemData.Transformations; 76 var targetVar = Content.ProblemData.TargetVariable; 77 var newModel = transformator.Backtransform(Content.Model, transformations, targetVar); 78 Content.Model = (ISymbolicRegressionModel)newModel; 79 80 MessageBox.Show(this, "Backtransformation successful."); 81 } 69 82 } 70 83 }
Note: See TracChangeset
for help on using the changeset viewer.