Changeset 15864
- Timestamp:
- 03/26/18 17:09:19 (7 years ago)
- Location:
- branches/2906_Transformations
- Files:
-
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.Designer.cs
r15583 r15864 48 48 this.exportFileDialog = new System.Windows.Forms.SaveFileDialog(); 49 49 this.btnSimplify = new System.Windows.Forms.Button(); 50 this.transformModelButton = new System.Windows.Forms.Button();51 50 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 52 51 this.splitContainer.Panel1.SuspendLayout(); … … 61 60 this.flowLayoutPanel.Controls.Add(this.btnSimplify); 62 61 this.flowLayoutPanel.Controls.Add(this.exportButton); 63 this.flowLayoutPanel.Controls.Add(this.transformModelButton);64 62 // 65 63 // btnSimplify … … 91 89 this.toolTip.SetToolTip(this.exportButton, "Exports the symbolic regression solution to Excel."); 92 90 // 93 // transformModelButton94 //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, 24);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 //107 91 // SymbolicRegressionSolutionView 108 92 // … … 123 107 protected System.Windows.Forms.Button exportButton; 124 108 protected System.Windows.Forms.Button btnSimplify; 125 protected System.Windows.Forms.Button transformModelButton;126 109 } 127 110 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs
r15583 r15864 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;49 47 } 50 48 … … 68 66 } 69 67 } 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 78 var transformedModel = (ISymbolicRegressionModel)transformator.Backtransform(Content.Model, transformations, targetVar);79 var transformedSolution = new SymbolicRegressionSolution(transformedModel, (IRegressionProblemData)Content.ProblemData.Clone());80 81 MainFormManager.MainForm.ShowContent(transformedSolution);82 }83 68 } 84 69 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r15863 r15864 310 310 <Compile Include="Symbols\VariableConditionTreeNode.cs" /> 311 311 <Compile Include="Symbols\VariableTreeNode.cs" /> 312 <Compile Include="Transformations\SymbolicExpressionTreeBacktransformator.cs" />313 <Compile Include="Transformations\TransformationToSymbolicTreeMapper.cs" />314 312 <Compile Include="TreeMatching\SymbolicExpressionTreeBottomUpSimilarityCalculator.cs" /> 315 313 <Compile Include="TreeMatching\SymbolicExpressionTreeCanonicalSorter.cs" /> -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.Designer.cs
r15856 r15864 19 19 */ 20 20 #endregion 21 21 22 22 23 … … 46 47 /// </summary> 47 48 private void InitializeComponent() { 49 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RegressionSolutionView)); 48 50 this.TransformButton = new System.Windows.Forms.Button(); 49 51 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); … … 72 74 // TransformButton 73 75 // 76 this.TransformButton.AutoSize = true; 77 this.TransformButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 74 78 this.TransformButton.Location = new System.Drawing.Point(117, 3); 75 79 this.TransformButton.Name = "TransformButton"; 76 this.TransformButton.Size = new System.Drawing.Size( 75, 23);80 this.TransformButton.Size = new System.Drawing.Size(108, 23); 77 81 this.TransformButton.TabIndex = 1; 78 this.TransformButton.Text = "Reverse Transformations"; 82 this.TransformButton.Text = "Transform Back"; 83 this.TransformButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 84 this.toolTip.SetToolTip(this.TransformButton, "TODO: Backtransform model based on the stored transformations."); 79 85 this.TransformButton.UseVisualStyleBackColor = true; 80 86 this.TransformButton.Click += new System.EventHandler(this.transformButton_Click); -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
r15856 r15864 22 22 using System.Linq; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Common.Resources; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.MainForm; … … 31 32 public RegressionSolutionView() { 32 33 InitializeComponent(); 34 TransformButton.Image = VSImageLibrary.Event; 33 35 flowLayoutPanel.Controls.Add(TransformButton); 34 36 } … … 41 43 protected override void SetEnabledStateOfControls() { 42 44 base.SetEnabledStateOfControls(); 45 TransformButton.Enabled = Content != null; 43 46 TransformButton.Visible = Content != null && Content.ProblemData.Transformations.Any(); 44 47 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/TransformedRegressionSolutionView.cs
r15862 r15864 25 25 namespace HeuristicLab.Problems.DataAnalysis.Views { 26 26 [View("Transformation Solution View")] 27 [Content(typeof(TransformedRegressionSolution), true)]27 [Content(typeof(TransformedRegressionSolution), false)] 28 28 public partial class TransformedRegressionSolutionView : RegressionSolutionView { 29 29 -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r15846 r15864 242 242 <Compile Include="Interfaces\IDependencyCalculator.cs" /> 243 243 <Compile Include="Interfaces\ITransformation.cs" /> 244 <Compile Include="Interfaces\ITransformationMapper.cs" />245 244 <Compile Include="Interfaces\Regression\ITransformedRegressionModel.cs" /> 246 245 <Compile Include="Interfaces\Regression\ITransformedRegressionSolution.cs" /> -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/TransformedRegressionModel.cs
r15847 r15864 75 75 // problemData in original data range 76 76 public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 77 // TODO: specialized views for the original solution type are lost (RandomForestSolutionView, ...) 77 78 return new TransformedRegressionSolution(this, new RegressionProblemData(problemData)); 78 79 }
Note: See TracChangeset
for help on using the changeset viewer.