Changeset 15846
- Timestamp:
- 03/19/18 10:25:45 (7 years ago)
- 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 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Reflection; 22 using System.Linq; 25 23 using System.Windows.Forms; 26 24 using HeuristicLab.Core; 27 25 using HeuristicLab.Core.Views; 26 using HeuristicLab.Data; 28 27 using HeuristicLab.MainForm; 29 using HeuristicLab.PluginInfrastructure;30 28 using HeuristicLab.Problems.DataAnalysis; 31 29 32 30 namespace HeuristicLab.DataPreprocessing.Views { 33 31 [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 36 37 public CheckedTransformationListView() { 37 38 InitializeComponent(); … … 39 40 } 40 41 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 //} 48 52 49 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {50 try {51 // TODO: Avoid accessing parent view52 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; 54 58 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; 61 65 } 62 66 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 //} 70 74 } 71 75 } -
branches/2906_Transformations/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj
r15837 r15846 91 91 <SpecificVersion>False</SpecificVersion> 92 92 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 93 <Private>False</Private> 93 94 </Reference> 94 95 <Reference Include="HeuristicLab.Analysis.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 95 96 <SpecificVersion>False</SpecificVersion> 96 97 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis.Views-3.3.dll</HintPath> 98 <Private>False</Private> 97 99 </Reference> 98 100 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 99 101 <SpecificVersion>False</SpecificVersion> 100 102 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Collections-3.3.dll</HintPath> 103 <Private>False</Private> 101 104 </Reference> 102 105 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 103 106 <SpecificVersion>False</SpecificVersion> 104 107 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath> 108 <Private>False</Private> 105 109 </Reference> 106 110 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 107 111 <SpecificVersion>False</SpecificVersion> 108 112 <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> 111 119 <Reference Include="HeuristicLab.Core.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 112 120 <SpecificVersion>False</SpecificVersion> 113 121 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core.Views-3.3.dll</HintPath> 122 <Private>False</Private> 114 123 </Reference> 115 124 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 116 125 <SpecificVersion>False</SpecificVersion> 117 126 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath> 127 <Private>False</Private> 118 128 </Reference> 119 129 <Reference Include="HeuristicLab.Data.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 120 130 <SpecificVersion>False</SpecificVersion> 121 131 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath> 132 <Private>False</Private> 122 133 </Reference> 123 134 <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 124 135 <SpecificVersion>False</SpecificVersion> 125 136 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.MainForm-3.3.dll</HintPath> 137 <Private>False</Private> 126 138 </Reference> 127 139 <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 128 140 <SpecificVersion>False</SpecificVersion> 129 141 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath> 142 <Private>False</Private> 130 143 </Reference> 131 144 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 132 145 <SpecificVersion>False</SpecificVersion> 133 146 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 147 <Private>False</Private> 134 148 </Reference> 135 149 <Reference Include="HeuristicLab.Optimizer-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 136 150 <SpecificVersion>False</SpecificVersion> 137 151 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimizer-3.3.dll</HintPath> 152 <Private>False</Private> 138 153 </Reference> 139 154 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 140 155 <SpecificVersion>False</SpecificVersion> 141 156 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 157 <Private>False</Private> 142 158 </Reference> 143 159 <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 144 160 <SpecificVersion>False</SpecificVersion> 145 161 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 162 <Private>False</Private> 146 163 </Reference> 147 164 <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 148 165 <SpecificVersion>False</SpecificVersion> 149 166 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances.DataAnalysis-3.3.dll</HintPath> 167 <Private>False</Private> 150 168 </Reference> 151 169 <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 152 170 <SpecificVersion>False</SpecificVersion> 153 171 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.dll</HintPath> 172 <Private>False</Private> 154 173 </Reference> 155 174 <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 156 175 <SpecificVersion>False</SpecificVersion> 157 176 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath> 177 <Private>False</Private> 158 178 </Reference> 159 179 <Reference Include="System" /> … … 312 332 <Project>{3e9e8944-44ff-40bb-a622-3a4a7dd0f198}</Project> 313 333 <Name>HeuristicLab.Problems.DataAnalysis.Views-3.4</Name> 334 <Private>False</Private> 314 335 </ProjectReference> 315 336 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 316 337 <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project> 317 338 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 339 <Private>False</Private> 318 340 </ProjectReference> 319 341 </ItemGroup> … … 325 347 <EmbeddedResource Include="ScatterPlotSingleView.resx"> 326 348 <DependentUpon>ScatterPlotSingleView.cs</DependentUpon> 349 </EmbeddedResource> 350 <EmbeddedResource Include="TransformationView.resx"> 351 <DependentUpon>TransformationView.cs</DependentUpon> 327 352 </EmbeddedResource> 328 353 </ItemGroup> -
branches/2906_Transformations/HeuristicLab.DataPreprocessing.Views/3.4/TransformationView.Designer.cs
r15583 r15846 46 46 private void InitializeComponent() { 47 47 this.applyButton = new System.Windows.Forms.Button(); 48 this.preserveColumnsCheckbox = new System.Windows.Forms.CheckBox();49 48 this.lblFilterNotice = new System.Windows.Forms.Label(); 50 49 this.transformationListView = new HeuristicLab.DataPreprocessing.Views.CheckedTransformationListView(); … … 62 61 this.applyButton.Click += new System.EventHandler(this.applyButton_Click); 63 62 // 64 // preserveColumnsCheckbox65 //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 //75 63 // lblFilterNotice 76 64 // … … 86 74 // transformationListView 87 75 // 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) 90 78 | System.Windows.Forms.AnchorStyles.Right))); 91 79 this.transformationListView.Caption = "Transformations"; … … 102 90 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 103 91 this.Controls.Add(this.lblFilterNotice); 104 this.Controls.Add(this.preserveColumnsCheckbox);105 92 this.Controls.Add(this.applyButton); 106 93 this.Controls.Add(this.transformationListView); … … 115 102 private CheckedTransformationListView transformationListView; 116 103 private System.Windows.Forms.Button applyButton; 117 private System.Windows.Forms.CheckBox preserveColumnsCheckbox;118 104 private System.Windows.Forms.Label lblFilterNotice; 119 105 } -
branches/2906_Transformations/HeuristicLab.DataPreprocessing.Views/3.4/TransformationView.cs
r15583 r15846 21 21 22 22 using System; 23 using System. Linq;23 using System.Collections.Generic; 24 24 using System.Windows.Forms; 25 25 using HeuristicLab.MainForm; 26 26 using HeuristicLab.MainForm.WindowsForms; 27 using HeuristicLab.Problems.DataAnalysis;28 27 29 28 namespace HeuristicLab.DataPreprocessing.Views { … … 46 45 } else { 47 46 transformationListView.Content = Content.CheckedTransformationList; 47 transformationListView.PreprocessingData = Content.PreprocessingData; 48 48 CheckFilters(); 49 49 } … … 75 75 76 76 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); 78 78 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);88 79 if (success) { 89 80 Content.CheckedTransformationList.Clear(); 90 81 MessageBox.Show(this, "Transformations applied.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 91 82 } 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); 95 84 } 96 85 } -
branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Content/TransformationContent.cs
r15583 r15846 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using System.Drawing; 24 using System.Linq; 23 25 using HeuristicLab.Common; 24 26 using HeuristicLab.Core; … … 35 37 36 38 [Storable] 37 public ICheckedItemList<I Transformation> CheckedTransformationList { get; private set; }39 public ICheckedItemList<IDataAnalysisTransformation> CheckedTransformationList { get; private set; } 38 40 39 41 #region Constructor, Cloning & Persistence 40 42 public TransformationContent(IFilteredPreprocessingData preprocessingData) 41 43 : base(preprocessingData) { 42 CheckedTransformationList = new CheckedItemList<I Transformation>();44 CheckedTransformationList = new CheckedItemList<IDataAnalysisTransformation>(); 43 45 } 44 46 … … 55 57 : base(deserializing) { } 56 58 #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 } 57 97 } 58 98 } -
branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs
r15594 r15846 204 204 205 205 #region Transformations 206 public IList<I Transformation> Transformations {206 public IList<IDataAnalysisTransformation> Transformations { 207 207 get { return originalData.Transformations; } 208 208 } -
branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Data/IPreprocessingData.cs
r15583 r15846 78 78 79 79 #region Transformations 80 IList<I Transformation> Transformations { get; }80 IList<IDataAnalysisTransformation> Transformations { get; } 81 81 #endregion 82 82 -
branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs
r15583 r15846 47 47 Name = "Preprocessing Data"; 48 48 49 Transformations = new List<I Transformation>();49 Transformations = new List<IDataAnalysisTransformation>(); 50 50 selection = new Dictionary<int, IList<int>>(); 51 51 … … 61 61 TrainingPartition = (IntRange)original.TrainingPartition.Clone(cloner); 62 62 TestPartition = (IntRange)original.TestPartition.Clone(cloner); 63 Transformations = new List<I Transformation>(original.Transformations.Select(cloner.Clone));63 Transformations = new List<IDataAnalysisTransformation>(original.Transformations.Select(cloner.Clone)); 64 64 65 65 InputVariables = new List<string>(original.InputVariables); … … 350 350 #region Transformations 351 351 [Storable] 352 public IList<I Transformation> Transformations { get; protected set; }352 public IList<IDataAnalysisTransformation> Transformations { get; protected set; } 353 353 #endregion 354 354 … … 459 459 public IntRange TrainingPartition { get; set; } 460 460 public IntRange TestPartition { get; set; } 461 public IList<I Transformation> Transformations { get; set; }461 public IList<IDataAnalysisTransformation> Transformations { get; set; } 462 462 public DataPreprocessingChangedEventType ChangedType { get; set; } 463 463 … … 487 487 TrainingPartition = new IntRange(TrainingPartition.Start, TrainingPartition.End), 488 488 TestPartition = new IntRange(TestPartition.Start, TestPartition.End), 489 Transformations = new List<I Transformation>(Transformations),489 Transformations = new List<IDataAnalysisTransformation>(Transformations), 490 490 ChangedType = changedType, 491 491 ChangedColumn = column, -
branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj
r15837 r15846 76 76 <SpecificVersion>False</SpecificVersion> 77 77 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 78 <Private>False</Private> 78 79 </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> 80 84 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 81 85 <SpecificVersion>False</SpecificVersion> 82 86 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath> 87 <Private>False</Private> 83 88 </Reference> 84 89 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 85 90 <SpecificVersion>False</SpecificVersion> 86 91 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath> 92 <Private>False</Private> 87 93 </Reference> 88 94 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 89 95 <SpecificVersion>False</SpecificVersion> 90 96 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath> 97 <Private>False</Private> 91 98 </Reference> 92 99 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 93 100 <SpecificVersion>False</SpecificVersion> 94 101 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath> 102 <Private>False</Private> 95 103 </Reference> 96 104 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 97 105 <SpecificVersion>False</SpecificVersion> 98 106 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 107 <Private>False</Private> 99 108 </Reference> 100 109 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 101 110 <SpecificVersion>False</SpecificVersion> 102 111 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 112 <Private>False</Private> 103 113 </Reference> 104 114 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 105 115 <SpecificVersion>False</SpecificVersion> 106 116 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 117 <Private>False</Private> 107 118 </Reference> 108 119 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 109 120 <SpecificVersion>False</SpecificVersion> 110 121 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Random-3.3.dll</HintPath> 122 <Private>False</Private> 111 123 </Reference> 112 124 <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 113 125 <SpecificVersion>False</SpecificVersion> 114 126 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath> 127 <Private>False</Private> 115 128 </Reference> 116 129 <Reference Include="System" /> … … 130 143 <Compile Include="Data\IFilteredPreprocessingData.cs" /> 131 144 <Compile Include="Content\CorrelationMatrixContent.cs" /> 132 <Compile Include="PreprocessingTransformator.cs" />133 145 <Compile Include="Data\DataPreprocessingChangedEvent.cs" /> 134 146 <Compile Include="Filter\ComparisonFilter.cs" /> … … 156 168 <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project> 157 169 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 170 <Private>False</Private> 158 171 </ProjectReference> 159 172 </ItemGroup> -
branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs
r15583 r15846 34 34 } 35 35 36 private IList<I Transformation> Transformations {36 private IList<IDataAnalysisTransformation> Transformations { 37 37 get { return context.Data.Transformations; } 38 38 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r15837 r15846 101 101 <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 102 102 <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath> 103 <SpecificVersion>False</SpecificVersion> 103 104 <Private>False</Private> 104 105 </Reference> … … 106 107 <SpecificVersion>False</SpecificVersion> 107 108 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath> 109 <Private>False</Private> 108 110 </Reference> 109 111 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 110 112 <SpecificVersion>False</SpecificVersion> 111 113 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 114 <Private>False</Private> 112 115 </Reference> 113 116 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 114 117 <SpecificVersion>False</SpecificVersion> 115 118 <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> 118 125 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 119 126 <SpecificVersion>False</SpecificVersion> 120 127 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath> 128 <Private>False</Private> 121 129 </Reference> 122 130 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 123 131 <SpecificVersion>False</SpecificVersion> 124 132 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath> 133 <Private>False</Private> 125 134 </Reference> 126 135 <Reference Include="HeuristicLab.Core.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 127 136 <SpecificVersion>False</SpecificVersion> 128 137 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core.Views-3.3.dll</HintPath> 138 <Private>False</Private> 129 139 </Reference> 130 140 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 131 141 <SpecificVersion>False</SpecificVersion> 132 142 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath> 143 <Private>False</Private> 133 144 </Reference> 134 145 <Reference Include="HeuristicLab.Data.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 135 146 <SpecificVersion>False</SpecificVersion> 136 147 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath> 148 <Private>False</Private> 137 149 </Reference> 138 150 <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 139 151 <SpecificVersion>False</SpecificVersion> 140 152 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.MainForm-3.3.dll</HintPath> 153 <Private>False</Private> 141 154 </Reference> 142 155 <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 143 156 <SpecificVersion>False</SpecificVersion> 144 157 <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> 147 164 <Reference Include="HeuristicLab.Optimization.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 148 165 <SpecificVersion>False</SpecificVersion> 149 166 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization.Views-3.3.dll</HintPath> 167 <Private>False</Private> 150 168 </Reference> 151 169 <Reference Include="HeuristicLab.Optimizer-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 152 170 <SpecificVersion>False</SpecificVersion> 153 171 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimizer-3.3.dll</HintPath> 172 <Private>False</Private> 154 173 </Reference> 155 174 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 156 175 <SpecificVersion>False</SpecificVersion> 157 176 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 177 <Private>False</Private> 158 178 </Reference> 159 179 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 160 180 <SpecificVersion>False</SpecificVersion> 161 181 <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> 164 189 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 165 190 <SpecificVersion>False</SpecificVersion> 166 191 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll</HintPath> 192 <Private>False</Private> 167 193 </Reference> 168 194 <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 169 195 <SpecificVersion>False</SpecificVersion> 170 196 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath> 197 <Private>False</Private> 171 198 </Reference> 172 199 <Reference Include="System" /> … … 559 586 <DependentUpon>AbstractFeatureCorrelationView.cs</DependentUpon> 560 587 </EmbeddedResource> 588 <EmbeddedResource Include="Solution Views\RegressionSolutionView.resx"> 589 <DependentUpon>RegressionSolutionView.cs</DependentUpon> 590 </EmbeddedResource> 561 591 </ItemGroup> 562 592 <ItemGroup> … … 564 594 <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project> 565 595 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 596 <Private>False</Private> 566 597 </ProjectReference> 567 598 </ItemGroup> -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.Designer.cs
r15583 r15846 46 46 /// </summary> 47 47 private void InitializeComponent() { 48 this.transformButton = new System.Windows.Forms.Button(); 48 49 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 49 50 this.splitContainer.Panel1.SuspendLayout(); … … 53 54 this.detailsGroupBox.SuspendLayout(); 54 55 this.SuspendLayout(); 56 // 57 // splitContainer 58 // 59 // 55 60 // itemsGroupBox 56 61 // … … 65 70 this.toolTip.SetToolTip(this.removeButton, "Remove"); 66 71 // 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 // 67 82 // RegressionSolutionView 68 83 // 69 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);70 84 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 71 85 this.Name = "RegressionSolutionView"; … … 81 95 82 96 #endregion 97 98 private System.Windows.Forms.Button transformButton; 83 99 } 84 100 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
r15583 r15846 20 20 #endregion 21 21 22 using System.Linq; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.Core; … … 30 31 public RegressionSolutionView() { 31 32 InitializeComponent(); 33 flowLayoutPanel.Controls.Add(transformButton); 32 34 } 33 35 … … 35 37 get { return (RegressionSolutionBase)base.Content; } 36 38 set { base.Content = value; } 39 } 40 41 protected override void SetEnabledStateOfControls() { 42 base.SetEnabledStateOfControls(); 43 transformButton.Visible = Content != null && Content.ProblemData.Transformations.Any(); 37 44 } 38 45 … … 51 58 } 52 59 #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 } 53 67 } 54 68 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4
- Property svn:ignore
-
old new 5 5 *.vs10x 6 6 Plugin.cs 7 *.DotSettings
-
- Property svn:ignore
-
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r15837 r15846 101 101 <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 102 102 <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> 106 110 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 107 111 <SpecificVersion>False</SpecificVersion> 108 112 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath> 113 <Private>False</Private> 109 114 </Reference> 110 115 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 111 116 <SpecificVersion>False</SpecificVersion> 112 117 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath> 118 <Private>False</Private> 113 119 </Reference> 114 120 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 115 121 <SpecificVersion>False</SpecificVersion> 116 122 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath> 123 <Private>False</Private> 117 124 </Reference> 118 125 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 119 126 <SpecificVersion>False</SpecificVersion> 120 127 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath> 128 <Private>False</Private> 121 129 </Reference> 122 130 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 123 131 <SpecificVersion>False</SpecificVersion> 124 132 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 133 <Private>False</Private> 125 134 </Reference> 126 135 <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 127 136 <SpecificVersion>False</SpecificVersion> 128 137 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 138 <Private>False</Private> 129 139 </Reference> 130 140 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 131 141 <SpecificVersion>False</SpecificVersion> 132 142 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 143 <Private>False</Private> 133 144 </Reference> 134 145 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 135 146 <SpecificVersion>False</SpecificVersion> 136 147 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 148 <Private>False</Private> 137 149 </Reference> 138 150 <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 139 151 <SpecificVersion>False</SpecificVersion> 140 152 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 153 <Private>False</Private> 141 154 </Reference> 142 155 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 143 156 <SpecificVersion>False</SpecificVersion> 144 157 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Random-3.3.dll</HintPath> 158 <Private>False</Private> 145 159 </Reference> 146 160 <Reference Include="System" /> … … 181 195 <Compile Include="Implementation\ConstantModel.cs" /> 182 196 <Compile Include="Implementation\DataAnalysisModel.cs" /> 197 <Compile Include="Implementation\DataAnalysisTransformation.cs" /> 183 198 <Compile Include="Implementation\Regression\ConfidenceBoundRegressionSolution.cs" /> 184 199 <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" /> … … 191 206 <Compile Include="Implementation\Regression\RegressionModel.cs" /> 192 207 <Compile Include="Implementation\Regression\RegressionSolutionVariableImpactsCalculator.cs" /> 208 <Compile Include="Implementation\Regression\TransformedRegressionModel.cs" /> 209 <Compile Include="Implementation\Regression\TransformedRegressionSolution.cs" /> 193 210 <Compile Include="Implementation\TimeSeriesPrognosis\Models\ConstantTimeSeriesPrognosisModel.cs" /> 194 211 <Compile Include="Implementation\TimeSeriesPrognosis\Models\TimeSeriesPrognosisAutoRegressiveModel.cs" /> … … 198 215 <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisSolution.cs" /> 199 216 <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" /> 201 226 <Compile Include="Implementation\Transformations\ExponentialTransformation.cs" /> 227 <Compile Include="Implementation\Transformations\IdentityTransformation.cs" /> 202 228 <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" /> 208 230 <Compile Include="Implementation\Transformations\Transformation.cs" /> 231 <Compile Include="Implementation\Transformations\ZNormalizationTransformation.cs" /> 209 232 <Compile Include="Interfaces\Classification\IClassificationEnsembleModel.cs"> 210 233 <SubType>Code</SubType> … … 215 238 <Compile Include="Interfaces\Classification\IDiscriminantFunctionThresholdCalculator.cs" /> 216 239 <Compile Include="Interfaces\IDataAnalysisSolutionExporter.cs" /> 240 <Compile Include="Interfaces\IDataAnalysisTransformation.cs" /> 217 241 <Compile Include="Interfaces\IDataset.cs" /> 218 242 <Compile Include="Interfaces\IDependencyCalculator.cs" /> 219 243 <Compile Include="Interfaces\ITransformation.cs" /> 220 244 <Compile Include="Interfaces\ITransformationMapper.cs" /> 245 <Compile Include="Interfaces\Regression\ITransformedRegressionModel.cs" /> 246 <Compile Include="Interfaces\Regression\ITransformedRegressionSolution.cs" /> 221 247 <Compile Include="Interfaces\Regression\IConfidenceRegressionModel.cs" /> 222 248 <Compile Include="Interfaces\Regression\IConfidenceRegressionSolution.cs" /> -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r15583 r15846 333 333 } 334 334 335 public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<I Transformation> transformations = null)336 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<I Transformation>()) {335 public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<IDataAnalysisTransformation> transformations = null) 336 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) { 337 337 var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList(); 338 338 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 87 87 } 88 88 89 public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<I Transformation> transformations = null)90 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<I Transformation>()) {89 public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<IDataAnalysisTransformation> transformations = null) 90 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) { 91 91 } 92 92 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
r15583 r15846 74 74 } 75 75 76 public IFixedValueParameter<ReadOnlyItemList<I Transformation>> TransformationsParameter {77 get { return (IFixedValueParameter<ReadOnlyItemList<I Transformation>>)Parameters[TransformationsParameterName]; }76 public IFixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>> TransformationsParameter { 77 get { return (IFixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>>)Parameters[TransformationsParameterName]; } 78 78 } 79 79 #endregion … … 122 122 } 123 123 124 public IEnumerable<I Transformation> Transformations {124 public IEnumerable<IDataAnalysisTransformation> Transformations { 125 125 get { return TransformationsParameter.Value; } 126 126 } … … 148 148 [StorableHook(HookType.AfterDeserialization)] 149 149 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 154 155 RegisterEventHandlers(); 155 156 } 156 157 157 protected DataAnalysisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<I Transformation> transformations = null) {158 protected DataAnalysisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<IDataAnalysisTransformation> transformations = null) { 158 159 if (dataset == null) throw new ArgumentNullException("The dataset must not be null."); 159 160 if (allowedInputVariables == null) throw new ArgumentNullException("The allowed input variables must not be null."); … … 172 173 int testPartitionEnd = dataset.Rows; 173 174 174 var transformationsList = new ItemList<I Transformation>(transformations ?? Enumerable.Empty<ITransformation>());175 var transformationsList = new ItemList<IDataAnalysisTransformation>(transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()); 175 176 176 177 Parameters.Add(new FixedValueParameter<Dataset>(DatasetParameterName, "", (Dataset)dataset)); … … 178 179 Parameters.Add(new FixedValueParameter<IntRange>(TrainingPartitionParameterName, "", new IntRange(trainingPartitionStart, trainingPartitionEnd))); 179 180 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 }); 183 182 184 183 ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r15583 r15846 141 141 } 142 142 public RegressionProblemData(IRegressionProblemData regressionProblemData) 143 : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable ) {143 : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable, regressionProblemData.Transformations) { 144 144 TrainingPartition.Start = regressionProblemData.TrainingPartition.Start; 145 145 TrainingPartition.End = regressionProblemData.TrainingPartition.End; … … 148 148 } 149 149 150 public RegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<I Transformation> transformations = null)151 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<I Transformation>()) {150 public RegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<IDataAnalysisTransformation> transformations = null) 151 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) { 152 152 var variables = InputVariables.Select(x => x.AsReadOnly()).ToList(); 153 153 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 1582 1582 TrainingPartition.Start = 50; 1583 1583 } 1584 public TimeSeriesPrognosisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<I Transformation> transformations = null)1585 : base(dataset, allowedInputVariables, targetVariable, transformations ?? Enumerable.Empty<I Transformation>()) {1584 public TimeSeriesPrognosisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<IDataAnalysisTransformation> transformations = null) 1585 : base(dataset, allowedInputVariables, targetVariable, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) { 1586 1586 Parameters.Add(new FixedValueParameter<IntValue>(TrainingHorizonParameterName, "Specifies the horizon (how far the prognosis reaches in the future) for each training sample.", new IntValue(1))); 1587 1587 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 43 43 IEnumerable<int> TestIndices { get; } 44 44 45 IEnumerable<I Transformation> Transformations { get; }45 IEnumerable<IDataAnalysisTransformation> Transformations { get; } 46 46 47 47 bool IsTrainingSample(int index); -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/ITransformation.cs
r15583 r15846 24 24 25 25 namespace HeuristicLab.Problems.DataAnalysis { 26 public interface ITransformation : IParameterizedItem { 27 string ShortName { get; } 28 string Column { get; } 26 public interface ITransformation : IParameterizedNamedItem { 29 27 } 30 28 31 29 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 34 34 IEnumerable<T> Apply(IEnumerable<T> data); 35 IEnumerable<T> InverseApply(IEnumerable<T> data); 35 36 } 36 37 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/ITransformationMapper.cs
r15583 r15846 21 21 22 22 23 using System; 24 23 25 namespace HeuristicLab.Problems.DataAnalysis { 26 [Obsolete] 24 27 public interface ITransformationMapper<out T> { 25 28 T GenerateModel(ITransformation transformation);
Note: See TracChangeset
for help on using the changeset viewer.