Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15846


Ignore:
Timestamp:
03/19/18 10:25:45 (7 years ago)
Author:
pfleck
Message:

#2906 First concept of simple transformation (single target transformation)

Location:
branches/2906_Transformations
Files:
10 added
1 deleted
23 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing.Views/3.4/CheckedTransformationListView.cs

    r15583 r15846  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Reflection;
     22using System.Linq;
    2523using System.Windows.Forms;
    2624using HeuristicLab.Core;
    2725using HeuristicLab.Core.Views;
     26using HeuristicLab.Data;
    2827using HeuristicLab.MainForm;
    29 using HeuristicLab.PluginInfrastructure;
    3028using HeuristicLab.Problems.DataAnalysis;
    3129
    3230namespace HeuristicLab.DataPreprocessing.Views {
    3331  [View("CheckedTransformationList View")]
    34   [Content(typeof(ICheckedItemList<ITransformation>), false)]
    35   public partial class CheckedTransformationListView : CheckedItemListView<ITransformation> {
     32  [Content(typeof(ICheckedItemList<IDataAnalysisTransformation>), false)]
     33  public partial class CheckedTransformationListView : CheckedItemListView<IDataAnalysisTransformation> {
     34
     35    internal IFilteredPreprocessingData PreprocessingData { get; set; }
     36
    3637    public CheckedTransformationListView() {
    3738      InitializeComponent();
     
    3940    }
    4041
    41     protected override ITransformation CreateItem() {
    42       if (typeSelectorDialog == null) {
    43         typeSelectorDialog = new TypeSelectorDialog();
    44         typeSelectorDialog.Caption = "Select Transformation";
    45         typeSelectorDialog.TypeSelector.Caption = "Available Transformations";
    46         typeSelectorDialog.TypeSelector.Configure(typeof(ITransformation), showNotInstantiableTypes: true, showGenericTypes: false, typeCondition: CanInstanciateTransformation);
    47       }
     42    protected override IDataAnalysisTransformation CreateItem() {
     43      var newTransformation = new DataAnalysisTransformation(PreprocessingData.VariableNames.Select(x => new StringValue(x)));
     44      newTransformation.TransformedVariableParameter.ValidValues.Add(new StringValue("<New Variable>"));
     45      return newTransformation;
     46      //if (typeSelectorDialog == null) {
     47      //  typeSelectorDialog = new TypeSelectorDialog();
     48      //  typeSelectorDialog.Caption = "Select Transformation";
     49      //  typeSelectorDialog.TypeSelector.Caption = "Available Transformations";
     50      //  typeSelectorDialog.TypeSelector.Configure(typeof(IDataAnalysisTransformation), showNotInstantiableTypes: true, showGenericTypes: false, typeCondition: CanInstanciateTransformation);
     51      //}
    4852
    49       if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
    50         try {
    51           // TODO: Avoid accessing parent view
    52           var transformationView = (TransformationView)Parent;
    53           var columnNames = transformationView.Content.PreprocessingData.VariableNames;
     53      //if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
     54      //  try {
     55      //    // TODO: Avoid accessing parent view
     56      //    var transformationView = (TransformationView)Parent;
     57      //    var columnNames = transformationView.Content.PreprocessingData.VariableNames;
    5458
    55           return (ITransformation)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(new[] { columnNames });
    56         } catch (Exception ex) {
    57           ErrorHandling.ShowErrorDialog(this, ex);
    58         }
    59       }
    60       return null;
     59      //    return (IDataAnalysisTransformation)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(new[] { columnNames });
     60      //  } catch (Exception ex) {
     61      //    ErrorHandling.ShowErrorDialog(this, ex);
     62      //  }
     63      //}
     64      //return null;
    6165    }
    6266
    63     private bool CanInstanciateTransformation(Type type) {
    64       foreach (ConstructorInfo ctor in type.GetConstructors(BindingFlags.Public | BindingFlags.Instance)) {
    65         ParameterInfo[] parameters = ctor.GetParameters();
    66         if (parameters.Length == 1 && parameters[0].ParameterType == typeof(IEnumerable<string>)) return true;
    67       }
    68       return false;
    69     }
     67    //private bool CanInstanciateTransformation(Type type) {
     68    //  foreach (ConstructorInfo ctor in type.GetConstructors(BindingFlags.Public | BindingFlags.Instance)) {
     69    //    ParameterInfo[] parameters = ctor.GetParameters();
     70    //    if (parameters.Length == 1 && parameters[0].ParameterType == typeof(IEnumerable<string>)) return true;
     71    //  }
     72    //  return false;
     73    //}
    7074  }
    7175}
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj

    r15837 r15846  
    9191      <SpecificVersion>False</SpecificVersion>
    9292      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
     93      <Private>False</Private>
    9394    </Reference>
    9495    <Reference Include="HeuristicLab.Analysis.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    9596      <SpecificVersion>False</SpecificVersion>
    9697      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis.Views-3.3.dll</HintPath>
     98      <Private>False</Private>
    9799    </Reference>
    98100    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    99101      <SpecificVersion>False</SpecificVersion>
    100102      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     103      <Private>False</Private>
    101104    </Reference>
    102105    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    103106      <SpecificVersion>False</SpecificVersion>
    104107      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath>
     108      <Private>False</Private>
    105109    </Reference>
    106110    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    107111      <SpecificVersion>False</SpecificVersion>
    108112      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
    109     </Reference>
    110     <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" />
     113      <Private>False</Private>
     114    </Reference>
     115    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     116      <SpecificVersion>False</SpecificVersion>
     117      <Private>False</Private>
     118    </Reference>
    111119    <Reference Include="HeuristicLab.Core.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    112120      <SpecificVersion>False</SpecificVersion>
    113121      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
     122      <Private>False</Private>
    114123    </Reference>
    115124    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    116125      <SpecificVersion>False</SpecificVersion>
    117126      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath>
     127      <Private>False</Private>
    118128    </Reference>
    119129    <Reference Include="HeuristicLab.Data.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    120130      <SpecificVersion>False</SpecificVersion>
    121131      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath>
     132      <Private>False</Private>
    122133    </Reference>
    123134    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    124135      <SpecificVersion>False</SpecificVersion>
    125136      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
     137      <Private>False</Private>
    126138    </Reference>
    127139    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    128140      <SpecificVersion>False</SpecificVersion>
    129141      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
     142      <Private>False</Private>
    130143    </Reference>
    131144    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    132145      <SpecificVersion>False</SpecificVersion>
    133146      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     147      <Private>False</Private>
    134148    </Reference>
    135149    <Reference Include="HeuristicLab.Optimizer-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    136150      <SpecificVersion>False</SpecificVersion>
    137151      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimizer-3.3.dll</HintPath>
     152      <Private>False</Private>
    138153    </Reference>
    139154    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    140155      <SpecificVersion>False</SpecificVersion>
    141156      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     157      <Private>False</Private>
    142158    </Reference>
    143159    <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    144160      <SpecificVersion>False</SpecificVersion>
    145161      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
     162      <Private>False</Private>
    146163    </Reference>
    147164    <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    148165      <SpecificVersion>False</SpecificVersion>
    149166      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances.DataAnalysis-3.3.dll</HintPath>
     167      <Private>False</Private>
    150168    </Reference>
    151169    <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    152170      <SpecificVersion>False</SpecificVersion>
    153171      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.dll</HintPath>
     172      <Private>False</Private>
    154173    </Reference>
    155174    <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    156175      <SpecificVersion>False</SpecificVersion>
    157176      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath>
     177      <Private>False</Private>
    158178    </Reference>
    159179    <Reference Include="System" />
     
    312332      <Project>{3e9e8944-44ff-40bb-a622-3a4a7dd0f198}</Project>
    313333      <Name>HeuristicLab.Problems.DataAnalysis.Views-3.4</Name>
     334      <Private>False</Private>
    314335    </ProjectReference>
    315336    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
    316337      <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project>
    317338      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
     339      <Private>False</Private>
    318340    </ProjectReference>
    319341  </ItemGroup>
     
    325347    <EmbeddedResource Include="ScatterPlotSingleView.resx">
    326348      <DependentUpon>ScatterPlotSingleView.cs</DependentUpon>
     349    </EmbeddedResource>
     350    <EmbeddedResource Include="TransformationView.resx">
     351      <DependentUpon>TransformationView.cs</DependentUpon>
    327352    </EmbeddedResource>
    328353  </ItemGroup>
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing.Views/3.4/TransformationView.Designer.cs

    r15583 r15846  
    4646    private void InitializeComponent() {
    4747      this.applyButton = new System.Windows.Forms.Button();
    48       this.preserveColumnsCheckbox = new System.Windows.Forms.CheckBox();
    4948      this.lblFilterNotice = new System.Windows.Forms.Label();
    5049      this.transformationListView = new HeuristicLab.DataPreprocessing.Views.CheckedTransformationListView();
     
    6261      this.applyButton.Click += new System.EventHandler(this.applyButton_Click);
    6362      //
    64       // preserveColumnsCheckbox
    65       //
    66       this.preserveColumnsCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    67       this.preserveColumnsCheckbox.AutoSize = true;
    68       this.preserveColumnsCheckbox.Location = new System.Drawing.Point(337, 492);
    69       this.preserveColumnsCheckbox.Name = "preserveColumnsCheckbox";
    70       this.preserveColumnsCheckbox.Size = new System.Drawing.Size(147, 17);
    71       this.preserveColumnsCheckbox.TabIndex = 2;
    72       this.preserveColumnsCheckbox.Text = "Preserve original Columns";
    73       this.preserveColumnsCheckbox.UseVisualStyleBackColor = true;
    74       //
    7563      // lblFilterNotice
    7664      //
     
    8674      // transformationListView
    8775      //
    88       this.transformationListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    89             | System.Windows.Forms.AnchorStyles.Left)
     76      this.transformationListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     77            | System.Windows.Forms.AnchorStyles.Left) 
    9078            | System.Windows.Forms.AnchorStyles.Right)));
    9179      this.transformationListView.Caption = "Transformations";
     
    10290      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    10391      this.Controls.Add(this.lblFilterNotice);
    104       this.Controls.Add(this.preserveColumnsCheckbox);
    10592      this.Controls.Add(this.applyButton);
    10693      this.Controls.Add(this.transformationListView);
     
    115102    private CheckedTransformationListView transformationListView;
    116103    private System.Windows.Forms.Button applyButton;
    117     private System.Windows.Forms.CheckBox preserveColumnsCheckbox;
    118104    private System.Windows.Forms.Label lblFilterNotice;
    119105  }
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing.Views/3.4/TransformationView.cs

    r15583 r15846  
    2121
    2222using System;
    23 using System.Linq;
     23using System.Collections.Generic;
    2424using System.Windows.Forms;
    2525using HeuristicLab.MainForm;
    2626using HeuristicLab.MainForm.WindowsForms;
    27 using HeuristicLab.Problems.DataAnalysis;
    2827
    2928namespace HeuristicLab.DataPreprocessing.Views {
     
    4645      } else {
    4746        transformationListView.Content = Content.CheckedTransformationList;
     47        transformationListView.PreprocessingData = Content.PreprocessingData;
    4848        CheckFilters();
    4949      }
     
    7575
    7676    private void applyButton_Click(object sender, EventArgs e) {
    77       var transformations = Content.CheckedTransformationList.CheckedItems.Select(x => x.Value);
     77      bool success = Content.ApplyTransformations(out IEnumerable<string> errorMessages);
    7878
    79       if (transformations.Any(x => ((Transformation)x).ColumnParameter.Value == null)) {
    80         MessageBox.Show(this, "Parameter \"Column\" of a selected Transformation is not set.", "Applying Transformations...", MessageBoxButtons.OK, MessageBoxIcon.Warning);
    81         return;
    82       }
    83 
    84       var transformator = new PreprocessingTransformator(Content.PreprocessingData);
    85       bool preserve = preserveColumnsCheckbox.CheckState == CheckState.Checked;
    86       string errorMsg;
    87       bool success = transformator.ApplyTransformations(transformations, preserve, out errorMsg);
    8879      if (success) {
    8980        Content.CheckedTransformationList.Clear();
    9081        MessageBox.Show(this, "Transformations applied.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
    9182      } else {
    92         MessageBox.Show(this,
    93           "Error in Transformation.\nValue is copied when transformion of cell failed.\n" + errorMsg,
    94           "Transformation failed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     83        MessageBox.Show(this, string.Join(Environment.NewLine, errorMessages), "Transformation failed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
    9584      }
    9685    }
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Content/TransformationContent.cs

    r15583 r15846  
    2020#endregion
    2121
     22using System.Collections.Generic;
    2223using System.Drawing;
     24using System.Linq;
    2325using HeuristicLab.Common;
    2426using HeuristicLab.Core;
     
    3537
    3638    [Storable]
    37     public ICheckedItemList<ITransformation> CheckedTransformationList { get; private set; }
     39    public ICheckedItemList<IDataAnalysisTransformation> CheckedTransformationList { get; private set; }
    3840
    3941    #region Constructor, Cloning & Persistence
    4042    public TransformationContent(IFilteredPreprocessingData preprocessingData)
    4143      : base(preprocessingData) {
    42       CheckedTransformationList = new CheckedItemList<ITransformation>();
     44      CheckedTransformationList = new CheckedItemList<IDataAnalysisTransformation>();
    4345    }
    4446
     
    5557      : base(deserializing) { }
    5658    #endregion
     59
     60    public bool ApplyTransformations(out IEnumerable<string> errorMessages) {
     61      var transformations = CheckedTransformationList.CheckedItems.Select(x => x.Value);
     62
     63      bool success = true;
     64      var errors = new List<string>();
     65      errorMessages = errors;
     66
     67      foreach (var transformation in transformations) {
     68        var sourceVariable = transformation.OriginalVariable;
     69        var targetVariable = transformation.TransformedVariable ?? sourceVariable + " Transformed";
     70        var sourceIdx = PreprocessingData.GetColumnIndex(sourceVariable);
     71
     72        if (transformation.Transformation is ITransformation<double> trans && PreprocessingData.VariableHasType<double>(sourceIdx)) {
     73          if (!PreprocessingData.VariableNames.Contains(targetVariable))
     74            PreprocessingData.InsertColumn<double>(targetVariable, PreprocessingData.Columns);
     75          var targetIdx = PreprocessingData.GetColumnIndex(targetVariable);
     76
     77          if (!PreprocessingData.VariableHasType<double>(targetIdx)) { success = false; errors.Add("Target column is not double."); continue; }
     78
     79          var sourceData = PreprocessingData.GetValues<double>(sourceIdx);
     80          if (!trans.Check(sourceData, out string msg)) { success = false; errors.Add(msg); continue; }
     81
     82          trans.Configure(sourceData);
     83          var transformedData = trans.Apply(sourceData).ToList();
     84
     85          PreprocessingData.SetValues(targetIdx, transformedData);
     86
     87          PreprocessingData.Transformations.Add(transformation);
     88          CheckedTransformationList.SetItemCheckedState(transformation, false);
     89        } else {
     90          success = false;
     91          errors.Add("Transformation datatype is not supported.");
     92        }
     93      }
     94
     95      return success;
     96    }
    5797  }
    5898}
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs

    r15594 r15846  
    204204
    205205    #region Transformations
    206     public IList<ITransformation> Transformations {
     206    public IList<IDataAnalysisTransformation> Transformations {
    207207      get { return originalData.Transformations; }
    208208    }
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Data/IPreprocessingData.cs

    r15583 r15846  
    7878
    7979    #region Transformations
    80     IList<ITransformation> Transformations { get; }
     80    IList<IDataAnalysisTransformation> Transformations { get; }
    8181    #endregion
    8282
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs

    r15583 r15846  
    4747      Name = "Preprocessing Data";
    4848
    49       Transformations = new List<ITransformation>();
     49      Transformations = new List<IDataAnalysisTransformation>();
    5050      selection = new Dictionary<int, IList<int>>();
    5151
     
    6161      TrainingPartition = (IntRange)original.TrainingPartition.Clone(cloner);
    6262      TestPartition = (IntRange)original.TestPartition.Clone(cloner);
    63       Transformations = new List<ITransformation>(original.Transformations.Select(cloner.Clone));
     63      Transformations = new List<IDataAnalysisTransformation>(original.Transformations.Select(cloner.Clone));
    6464
    6565      InputVariables = new List<string>(original.InputVariables);
     
    350350    #region Transformations
    351351    [Storable]
    352     public IList<ITransformation> Transformations { get; protected set; }
     352    public IList<IDataAnalysisTransformation> Transformations { get; protected set; }
    353353    #endregion
    354354
     
    459459      public IntRange TrainingPartition { get; set; }
    460460      public IntRange TestPartition { get; set; }
    461       public IList<ITransformation> Transformations { get; set; }
     461      public IList<IDataAnalysisTransformation> Transformations { get; set; }
    462462      public DataPreprocessingChangedEventType ChangedType { get; set; }
    463463
     
    487487        TrainingPartition = new IntRange(TrainingPartition.Start, TrainingPartition.End),
    488488        TestPartition = new IntRange(TestPartition.Start, TestPartition.End),
    489         Transformations = new List<ITransformation>(Transformations),
     489        Transformations = new List<IDataAnalysisTransformation>(Transformations),
    490490        ChangedType = changedType,
    491491        ChangedColumn = column,
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj

    r15837 r15846  
    7676      <SpecificVersion>False</SpecificVersion>
    7777      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
     78      <Private>False</Private>
    7879    </Reference>
    79     <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" />
     80    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     81      <SpecificVersion>False</SpecificVersion>
     82      <Private>False</Private>
     83    </Reference>
    8084    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    8185      <SpecificVersion>False</SpecificVersion>
    8286      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath>
     87      <Private>False</Private>
    8388    </Reference>
    8489    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    8590      <SpecificVersion>False</SpecificVersion>
    8691      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
     92      <Private>False</Private>
    8793    </Reference>
    8894    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    8995      <SpecificVersion>False</SpecificVersion>
    9096      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath>
     97      <Private>False</Private>
    9198    </Reference>
    9299    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    93100      <SpecificVersion>False</SpecificVersion>
    94101      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath>
     102      <Private>False</Private>
    95103    </Reference>
    96104    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    97105      <SpecificVersion>False</SpecificVersion>
    98106      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     107      <Private>False</Private>
    99108    </Reference>
    100109    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    101110      <SpecificVersion>False</SpecificVersion>
    102111      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     112      <Private>False</Private>
    103113    </Reference>
    104114    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    105115      <SpecificVersion>False</SpecificVersion>
    106116      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     117      <Private>False</Private>
    107118    </Reference>
    108119    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    109120      <SpecificVersion>False</SpecificVersion>
    110121      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Random-3.3.dll</HintPath>
     122      <Private>False</Private>
    111123    </Reference>
    112124    <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    113125      <SpecificVersion>False</SpecificVersion>
    114126      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath>
     127      <Private>False</Private>
    115128    </Reference>
    116129    <Reference Include="System" />
     
    130143    <Compile Include="Data\IFilteredPreprocessingData.cs" />
    131144    <Compile Include="Content\CorrelationMatrixContent.cs" />
    132     <Compile Include="PreprocessingTransformator.cs" />
    133145    <Compile Include="Data\DataPreprocessingChangedEvent.cs" />
    134146    <Compile Include="Filter\ComparisonFilter.cs" />
     
    156168      <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project>
    157169      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
     170      <Private>False</Private>
    158171    </ProjectReference>
    159172  </ItemGroup>
  • branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs

    r15583 r15846  
    3434    }
    3535
    36     private IList<ITransformation> Transformations {
     36    private IList<IDataAnalysisTransformation> Transformations {
    3737      get { return context.Data.Transformations; }
    3838    }
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r15837 r15846  
    101101    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    102102      <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath>
     103      <SpecificVersion>False</SpecificVersion>
    103104      <Private>False</Private>
    104105    </Reference>
     
    106107      <SpecificVersion>False</SpecificVersion>
    107108      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath>
     109      <Private>False</Private>
    108110    </Reference>
    109111    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    110112      <SpecificVersion>False</SpecificVersion>
    111113      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
     114      <Private>False</Private>
    112115    </Reference>
    113116    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    114117      <SpecificVersion>False</SpecificVersion>
    115118      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Collections-3.3.dll</HintPath>
    116     </Reference>
    117     <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" />
     119      <Private>False</Private>
     120    </Reference>
     121    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     122      <SpecificVersion>False</SpecificVersion>
     123      <Private>False</Private>
     124    </Reference>
    118125    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    119126      <SpecificVersion>False</SpecificVersion>
    120127      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
     128      <Private>False</Private>
    121129    </Reference>
    122130    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    123131      <SpecificVersion>False</SpecificVersion>
    124132      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath>
     133      <Private>False</Private>
    125134    </Reference>
    126135    <Reference Include="HeuristicLab.Core.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    127136      <SpecificVersion>False</SpecificVersion>
    128137      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
     138      <Private>False</Private>
    129139    </Reference>
    130140    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    131141      <SpecificVersion>False</SpecificVersion>
    132142      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath>
     143      <Private>False</Private>
    133144    </Reference>
    134145    <Reference Include="HeuristicLab.Data.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    135146      <SpecificVersion>False</SpecificVersion>
    136147      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath>
     148      <Private>False</Private>
    137149    </Reference>
    138150    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    139151      <SpecificVersion>False</SpecificVersion>
    140152      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
     153      <Private>False</Private>
    141154    </Reference>
    142155    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    143156      <SpecificVersion>False</SpecificVersion>
    144157      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
    145     </Reference>
    146     <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" />
     158      <Private>False</Private>
     159    </Reference>
     160    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     161      <SpecificVersion>False</SpecificVersion>
     162      <Private>False</Private>
     163    </Reference>
    147164    <Reference Include="HeuristicLab.Optimization.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    148165      <SpecificVersion>False</SpecificVersion>
    149166      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization.Views-3.3.dll</HintPath>
     167      <Private>False</Private>
    150168    </Reference>
    151169    <Reference Include="HeuristicLab.Optimizer-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    152170      <SpecificVersion>False</SpecificVersion>
    153171      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimizer-3.3.dll</HintPath>
     172      <Private>False</Private>
    154173    </Reference>
    155174    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    156175      <SpecificVersion>False</SpecificVersion>
    157176      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     177      <Private>False</Private>
    158178    </Reference>
    159179    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    160180      <SpecificVersion>False</SpecificVersion>
    161181      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
    162     </Reference>
    163     <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" />
     182      <Private>False</Private>
     183    </Reference>
     184    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     185      <SpecificVersion>False</SpecificVersion>
     186    <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>
     187      <Private>False</Private>
     188    </Reference>
    164189    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    165190      <SpecificVersion>False</SpecificVersion>
    166191      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll</HintPath>
     192      <Private>False</Private>
    167193    </Reference>
    168194    <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    169195      <SpecificVersion>False</SpecificVersion>
    170196      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath>
     197      <Private>False</Private>
    171198    </Reference>
    172199    <Reference Include="System" />
     
    559586      <DependentUpon>AbstractFeatureCorrelationView.cs</DependentUpon>
    560587    </EmbeddedResource>
     588    <EmbeddedResource Include="Solution Views\RegressionSolutionView.resx">
     589      <DependentUpon>RegressionSolutionView.cs</DependentUpon>
     590    </EmbeddedResource>
    561591  </ItemGroup>
    562592  <ItemGroup>
     
    564594      <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project>
    565595      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
     596      <Private>False</Private>
    566597    </ProjectReference>
    567598  </ItemGroup>
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.Designer.cs

    r15583 r15846  
    4646    /// </summary>
    4747    private void InitializeComponent() {
     48      this.transformButton = new System.Windows.Forms.Button();
    4849      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
    4950      this.splitContainer.Panel1.SuspendLayout();
     
    5354      this.detailsGroupBox.SuspendLayout();
    5455      this.SuspendLayout();
     56      //
     57      // splitContainer
     58      //
     59      //
    5560      // itemsGroupBox
    5661      //
     
    6570      this.toolTip.SetToolTip(this.removeButton, "Remove");
    6671      //
     72      // transformButton
     73      //
     74      this.transformButton.Location = new System.Drawing.Point(117, 3);
     75      this.transformButton.Name = "transformButton";
     76      this.transformButton.Size = new System.Drawing.Size(75, 23);
     77      this.transformButton.TabIndex = 1;
     78      this.transformButton.Text = "Transform";
     79      this.transformButton.UseVisualStyleBackColor = true;
     80      this.transformButton.Click += new System.EventHandler(this.transformButton_Click);
     81      //
    6782      // RegressionSolutionView
    6883      //
    69       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    7084      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    7185      this.Name = "RegressionSolutionView";
     
    8195
    8296    #endregion
     97
     98    private System.Windows.Forms.Button transformButton;
    8399  }
    84100}
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs

    r15583 r15846  
    2020#endregion
    2121
     22using System.Linq;
    2223using System.Windows.Forms;
    2324using HeuristicLab.Core;
     
    3031    public RegressionSolutionView() {
    3132      InitializeComponent();
     33      flowLayoutPanel.Controls.Add(transformButton);
    3234    }
    3335
     
    3537      get { return (RegressionSolutionBase)base.Content; }
    3638      set { base.Content = value; }
     39    }
     40
     41    protected override void SetEnabledStateOfControls() {
     42      base.SetEnabledStateOfControls();
     43      transformButton.Visible = Content != null && Content.ProblemData.Transformations.Any();
    3744    }
    3845
     
    5158    }
    5259    #endregion
     60
     61    private void transformButton_Click(object sender, System.EventArgs e) {
     62      var targetVariable = TransformedRegressionModel.GetOriginalTragetVariable(Content.Model.TargetVariable, Content.ProblemData.Transformations);
     63      var transformedModel = new TransformedRegressionModel(Content.Model, Content.ProblemData.Transformations);
     64      var transformedSolution = new TransformedRegressionSolution(transformedModel, new RegressionProblemData(Content.ProblemData) { TargetVariable = targetVariable });
     65      MainFormManager.MainForm.ShowContent(transformedSolution);
     66    }
    5367  }
    5468}
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4

    • Property svn:ignore
      •  

        old new  
        55*.vs10x
        66Plugin.cs
         7*.DotSettings
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r15837 r15846  
    101101    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    102102      <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath>
    103       <Private>False</Private>
    104     </Reference>
    105     <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" />
     103      <SpecificVersion>False</SpecificVersion>
     104      <Private>False</Private>
     105    </Reference>
     106    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     107      <SpecificVersion>False</SpecificVersion>
     108      <Private>False</Private>
     109    </Reference>
    106110    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    107111      <SpecificVersion>False</SpecificVersion>
    108112      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath>
     113      <Private>False</Private>
    109114    </Reference>
    110115    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    111116      <SpecificVersion>False</SpecificVersion>
    112117      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
     118      <Private>False</Private>
    113119    </Reference>
    114120    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    115121      <SpecificVersion>False</SpecificVersion>
    116122      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath>
     123      <Private>False</Private>
    117124    </Reference>
    118125    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    119126      <SpecificVersion>False</SpecificVersion>
    120127      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath>
     128      <Private>False</Private>
    121129    </Reference>
    122130    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    123131      <SpecificVersion>False</SpecificVersion>
    124132      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     133      <Private>False</Private>
    125134    </Reference>
    126135    <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    127136      <SpecificVersion>False</SpecificVersion>
    128137      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
     138      <Private>False</Private>
    129139    </Reference>
    130140    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    131141      <SpecificVersion>False</SpecificVersion>
    132142      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     143      <Private>False</Private>
    133144    </Reference>
    134145    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    135146      <SpecificVersion>False</SpecificVersion>
    136147      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     148      <Private>False</Private>
    137149    </Reference>
    138150    <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    139151      <SpecificVersion>False</SpecificVersion>
    140152      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
     153      <Private>False</Private>
    141154    </Reference>
    142155    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    143156      <SpecificVersion>False</SpecificVersion>
    144157      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Random-3.3.dll</HintPath>
     158      <Private>False</Private>
    145159    </Reference>
    146160    <Reference Include="System" />
     
    181195    <Compile Include="Implementation\ConstantModel.cs" />
    182196    <Compile Include="Implementation\DataAnalysisModel.cs" />
     197    <Compile Include="Implementation\DataAnalysisTransformation.cs" />
    183198    <Compile Include="Implementation\Regression\ConfidenceBoundRegressionSolution.cs" />
    184199    <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" />
     
    191206    <Compile Include="Implementation\Regression\RegressionModel.cs" />
    192207    <Compile Include="Implementation\Regression\RegressionSolutionVariableImpactsCalculator.cs" />
     208    <Compile Include="Implementation\Regression\TransformedRegressionModel.cs" />
     209    <Compile Include="Implementation\Regression\TransformedRegressionSolution.cs" />
    193210    <Compile Include="Implementation\TimeSeriesPrognosis\Models\ConstantTimeSeriesPrognosisModel.cs" />
    194211    <Compile Include="Implementation\TimeSeriesPrognosis\Models\TimeSeriesPrognosisAutoRegressiveModel.cs" />
     
    198215    <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisSolution.cs" />
    199216    <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisSolutionBase.cs" />
    200     <Compile Include="Implementation\Transformations\CopyColumnTransformation.cs" />
     217    <None Include="Implementation\Transformations %28old%29\CopyColumnTransformation.cs" />
     218    <None Include="Implementation\Transformations %28old%29\ExponentialTransformation.cs" />
     219    <None Include="Implementation\Transformations %28old%29\LinearTransformation.cs" />
     220    <None Include="Implementation\Transformations %28old%29\LogarithmicTransformation.cs" />
     221    <None Include="Implementation\Transformations %28old%29\PowerTransformation.cs" />
     222    <None Include="Implementation\Transformations %28old%29\ReciprocalTransformation.cs" />
     223    <None Include="Implementation\Transformations %28old%29\ShiftStandardDistributionTransformation.cs" />
     224    <None Include="Implementation\Transformations %28old%29\ShiftToRangeTransformation.cs" />
     225    <None Include="Implementation\Transformations %28old%29\Transformation.cs" />
    201226    <Compile Include="Implementation\Transformations\ExponentialTransformation.cs" />
     227    <Compile Include="Implementation\Transformations\IdentityTransformation.cs" />
    202228    <Compile Include="Implementation\Transformations\LinearTransformation.cs" />
    203     <Compile Include="Implementation\Transformations\LogarithmicTransformation.cs" />
    204     <Compile Include="Implementation\Transformations\PowerTransformation.cs" />
    205     <Compile Include="Implementation\Transformations\ReciprocalTransformation.cs" />
    206     <Compile Include="Implementation\Transformations\ShiftStandardDistributionTransformation.cs" />
    207     <Compile Include="Implementation\Transformations\ShiftToRangeTransformation.cs" />
     229    <Compile Include="Implementation\Transformations\LogarithmTransformation.cs" />
    208230    <Compile Include="Implementation\Transformations\Transformation.cs" />
     231    <Compile Include="Implementation\Transformations\ZNormalizationTransformation.cs" />
    209232    <Compile Include="Interfaces\Classification\IClassificationEnsembleModel.cs">
    210233      <SubType>Code</SubType>
     
    215238    <Compile Include="Interfaces\Classification\IDiscriminantFunctionThresholdCalculator.cs" />
    216239    <Compile Include="Interfaces\IDataAnalysisSolutionExporter.cs" />
     240    <Compile Include="Interfaces\IDataAnalysisTransformation.cs" />
    217241    <Compile Include="Interfaces\IDataset.cs" />
    218242    <Compile Include="Interfaces\IDependencyCalculator.cs" />
    219243    <Compile Include="Interfaces\ITransformation.cs" />
    220244    <Compile Include="Interfaces\ITransformationMapper.cs" />
     245    <Compile Include="Interfaces\Regression\ITransformedRegressionModel.cs" />
     246    <Compile Include="Interfaces\Regression\ITransformedRegressionSolution.cs" />
    221247    <Compile Include="Interfaces\Regression\IConfidenceRegressionModel.cs" />
    222248    <Compile Include="Interfaces\Regression\IConfidenceRegressionSolution.cs" />
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs

    r15583 r15846  
    333333    }
    334334
    335     public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    336       : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
     335    public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<IDataAnalysisTransformation> transformations = null)
     336      : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) {
    337337      var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList();
    338338      var target = validTargetVariableValues.Where(x => x.Value == targetVariable).DefaultIfEmpty(validTargetVariableValues.First()).First();
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs

    r15583 r15846  
    8787    }
    8888
    89     public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations = null)
    90       : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
     89    public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<IDataAnalysisTransformation> transformations = null)
     90      : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) {
    9191    }
    9292  }
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs

    r15583 r15846  
    7474    }
    7575
    76     public IFixedValueParameter<ReadOnlyItemList<ITransformation>> TransformationsParameter {
    77       get { return (IFixedValueParameter<ReadOnlyItemList<ITransformation>>)Parameters[TransformationsParameterName]; }
     76    public IFixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>> TransformationsParameter {
     77      get { return (IFixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>>)Parameters[TransformationsParameterName]; }
    7878    }
    7979    #endregion
     
    122122    }
    123123
    124     public IEnumerable<ITransformation> Transformations {
     124    public IEnumerable<IDataAnalysisTransformation> Transformations {
    125125      get { return TransformationsParameter.Value; }
    126126    }
     
    148148    [StorableHook(HookType.AfterDeserialization)]
    149149    private void AfterDeserialization() {
    150       if (!Parameters.ContainsKey(TransformationsParameterName)) {
    151         Parameters.Add(new FixedValueParameter<ReadOnlyItemList<ITransformation>>(TransformationsParameterName, "", new ItemList<ITransformation>().AsReadOnly()));
    152         TransformationsParameter.Hidden = true;
    153       }
     150      if (Parameters[TransformationsParameterName] is FixedValueParameter<ReadOnlyItemList<ITransformation>>)
     151        Parameters.Remove(TransformationsParameterName);
     152      if (!Parameters.ContainsKey(TransformationsParameterName))
     153        Parameters.Add(new FixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>>(TransformationsParameterName, new ItemList<IDataAnalysisTransformation>().AsReadOnly()) { Hidden = true });
     154
    154155      RegisterEventHandlers();
    155156    }
    156157
    157     protected DataAnalysisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations = null) {
     158    protected DataAnalysisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<IDataAnalysisTransformation> transformations = null) {
    158159      if (dataset == null) throw new ArgumentNullException("The dataset must not be null.");
    159160      if (allowedInputVariables == null) throw new ArgumentNullException("The allowed input variables must not be null.");
     
    172173      int testPartitionEnd = dataset.Rows;
    173174
    174       var transformationsList = new ItemList<ITransformation>(transformations ?? Enumerable.Empty<ITransformation>());
     175      var transformationsList = new ItemList<IDataAnalysisTransformation>(transformations ?? Enumerable.Empty<IDataAnalysisTransformation>());
    175176
    176177      Parameters.Add(new FixedValueParameter<Dataset>(DatasetParameterName, "", (Dataset)dataset));
     
    178179      Parameters.Add(new FixedValueParameter<IntRange>(TrainingPartitionParameterName, "", new IntRange(trainingPartitionStart, trainingPartitionEnd)));
    179180      Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", new IntRange(testPartitionStart, testPartitionEnd)));
    180       Parameters.Add(new FixedValueParameter<ReadOnlyItemList<ITransformation>>(TransformationsParameterName, "", transformationsList.AsReadOnly()));
    181 
    182       TransformationsParameter.Hidden = true;
     181      Parameters.Add(new FixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>>(TransformationsParameterName, "", transformationsList.AsReadOnly()) { Hidden = transformationsList.Count == 0 });
    183182
    184183      ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false;
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r15583 r15846  
    141141    }
    142142    public RegressionProblemData(IRegressionProblemData regressionProblemData)
    143       : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable) {
     143      : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable, regressionProblemData.Transformations) {
    144144      TrainingPartition.Start = regressionProblemData.TrainingPartition.Start;
    145145      TrainingPartition.End = regressionProblemData.TrainingPartition.End;
     
    148148    }
    149149
    150     public RegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    151       : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
     150    public RegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<IDataAnalysisTransformation> transformations = null)
     151      : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) {
    152152      var variables = InputVariables.Select(x => x.AsReadOnly()).ToList();
    153153      Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>(variables), variables.Where(x => x.Value == targetVariable).First()));
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs

    r15583 r15846  
    15821582      TrainingPartition.Start = 50;
    15831583    }
    1584     public TimeSeriesPrognosisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
    1585       : base(dataset, allowedInputVariables, targetVariable, transformations ?? Enumerable.Empty<ITransformation>()) {
     1584    public TimeSeriesPrognosisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<IDataAnalysisTransformation> transformations = null)
     1585      : base(dataset, allowedInputVariables, targetVariable, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) {
    15861586      Parameters.Add(new FixedValueParameter<IntValue>(TrainingHorizonParameterName, "Specifies the horizon (how far the prognosis reaches in the future) for each training sample.", new IntValue(1)));
    15871587      Parameters.Add(new FixedValueParameter<IntValue>(TestHorizonParameterName, "Specifies the horizon (how far the prognosis reaches in the future) for each test sample.", new IntValue(1)));
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs

    r15583 r15846  
    4343    IEnumerable<int> TestIndices { get; }
    4444
    45     IEnumerable<ITransformation> Transformations { get; }
     45    IEnumerable<IDataAnalysisTransformation> Transformations { get; }
    4646
    4747    bool IsTrainingSample(int index);
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/ITransformation.cs

    r15583 r15846  
    2424
    2525namespace HeuristicLab.Problems.DataAnalysis {
    26   public interface ITransformation : IParameterizedItem {
    27     string ShortName { get; }
    28     string Column { get; }
     26  public interface ITransformation : IParameterizedNamedItem {
    2927  }
    3028
    3129  public interface ITransformation<T> : ITransformation {
    32     void ConfigureParameters(IEnumerable<T> data);
    33     IEnumerable<T> ConfigureAndApply(IEnumerable<T> data);
     30    bool Check(IEnumerable<T> data, out string errorMessage);
     31
     32    void Configure(IEnumerable<T> data);
     33
    3434    IEnumerable<T> Apply(IEnumerable<T> data);
     35    IEnumerable<T> InverseApply(IEnumerable<T> data);
    3536  }
    3637}
  • branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/ITransformationMapper.cs

    r15583 r15846  
    2121
    2222
     23using System;
     24
    2325namespace HeuristicLab.Problems.DataAnalysis {
     26  [Obsolete]
    2427  public interface ITransformationMapper<out T> {
    2528    T GenerateModel(ITransformation transformation);
Note: See TracChangeset for help on using the changeset viewer.