Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15864


Ignore:
Timestamp:
03/26/18 17:09:19 (6 years ago)
Author:
pfleck
Message:

#2906 Removed obsolete transformation related code for SymReg. Small UI changes for transformed solutions.

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  
    4848      this.exportFileDialog = new System.Windows.Forms.SaveFileDialog();
    4949      this.btnSimplify = new System.Windows.Forms.Button();
    50       this.transformModelButton = new System.Windows.Forms.Button();
    5150      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
    5251      this.splitContainer.Panel1.SuspendLayout();
     
    6160      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
    6261      this.flowLayoutPanel.Controls.Add(this.exportButton);
    63       this.flowLayoutPanel.Controls.Add(this.transformModelButton);
    6462      //
    6563      // btnSimplify
     
    9189      this.toolTip.SetToolTip(this.exportButton, "Exports the symbolic regression solution to Excel.");
    9290      //
    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, 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       //
    10791      // SymbolicRegressionSolutionView
    10892      //
     
    123107    protected System.Windows.Forms.Button exportButton;
    124108    protected System.Windows.Forms.Button btnSimplify;
    125     protected System.Windows.Forms.Button transformModelButton;
    126109  }
    127110}
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs

    r15583 r15864  
    4545      btnSimplify.Enabled = Content != null && !Locked && Content.ProblemData.TrainingIndices.Any(); // simplification is only possible if there are trainings samples
    4646      exportButton.Enabled = Content != null && !Locked;
    47       transformModelButton.Visible = Content != null && Content.ProblemData.Transformations.Any();
    48       transformModelButton.Enabled = Content != null && !Locked;
    4947    }
    5048
     
    6866      }
    6967    }
    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     }
    8368  }
    8469}
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r15863 r15864  
    310310    <Compile Include="Symbols\VariableConditionTreeNode.cs" />
    311311    <Compile Include="Symbols\VariableTreeNode.cs" />
    312     <Compile Include="Transformations\SymbolicExpressionTreeBacktransformator.cs" />
    313     <Compile Include="Transformations\TransformationToSymbolicTreeMapper.cs" />
    314312    <Compile Include="TreeMatching\SymbolicExpressionTreeBottomUpSimilarityCalculator.cs" />
    315313    <Compile Include="TreeMatching\SymbolicExpressionTreeCanonicalSorter.cs" />
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.Designer.cs

    r15856 r15864  
    1919 */
    2020#endregion
     21
    2122
    2223
     
    4647    /// </summary>
    4748    private void InitializeComponent() {
     49      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RegressionSolutionView));
    4850      this.TransformButton = new System.Windows.Forms.Button();
    4951      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     
    7274      // TransformButton
    7375      //
     76      this.TransformButton.AutoSize = true;
     77      this.TransformButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    7478      this.TransformButton.Location = new System.Drawing.Point(117, 3);
    7579      this.TransformButton.Name = "TransformButton";
    76       this.TransformButton.Size = new System.Drawing.Size(75, 23);
     80      this.TransformButton.Size = new System.Drawing.Size(108, 23);
    7781      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.");
    7985      this.TransformButton.UseVisualStyleBackColor = true;
    8086      this.TransformButton.Click += new System.EventHandler(this.transformButton_Click);
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs

    r15856 r15864  
    2222using System.Linq;
    2323using System.Windows.Forms;
     24using HeuristicLab.Common.Resources;
    2425using HeuristicLab.Core;
    2526using HeuristicLab.MainForm;
     
    3132    public RegressionSolutionView() {
    3233      InitializeComponent();
     34      TransformButton.Image = VSImageLibrary.Event;
    3335      flowLayoutPanel.Controls.Add(TransformButton);
    3436    }
     
    4143    protected override void SetEnabledStateOfControls() {
    4244      base.SetEnabledStateOfControls();
     45      TransformButton.Enabled = Content != null;
    4346      TransformButton.Visible = Content != null && Content.ProblemData.Transformations.Any();
    4447    }
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/TransformedRegressionSolutionView.cs

    r15862 r15864  
    2525namespace HeuristicLab.Problems.DataAnalysis.Views {
    2626  [View("Transformation Solution View")]
    27   [Content(typeof(TransformedRegressionSolution), true)]
     27  [Content(typeof(TransformedRegressionSolution), false)]
    2828  public partial class TransformedRegressionSolutionView : RegressionSolutionView {
    2929
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r15846 r15864  
    242242    <Compile Include="Interfaces\IDependencyCalculator.cs" />
    243243    <Compile Include="Interfaces\ITransformation.cs" />
    244     <Compile Include="Interfaces\ITransformationMapper.cs" />
    245244    <Compile Include="Interfaces\Regression\ITransformedRegressionModel.cs" />
    246245    <Compile Include="Interfaces\Regression\ITransformedRegressionSolution.cs" />
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/TransformedRegressionModel.cs

    r15847 r15864  
    7575    // problemData in original data range
    7676    public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
     77      // TODO: specialized views for the original solution type are lost (RandomForestSolutionView, ...)
    7778      return new TransformedRegressionSolution(this, new RegressionProblemData(problemData));
    7879    }
Note: See TracChangeset for help on using the changeset viewer.