Changeset 7610
- Timestamp:
- 03/13/12 15:33:19 (13 years ago)
- Location:
- branches/ProblemInstancesRegressionAndClassification
- Files:
-
- 2 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab 3.3.sln
r7603 r7610 17 17 EndProject 18 18 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Instances.Regression.Views-3.4", "HeuristicLab.Problems.Instances.Regression.Views\3.4\HeuristicLab.Problems.Instances.Regression.Views-3.4.csproj", "{1CC61973-7706-42DC-8023-310F591AB02B}" 19 EndProject 20 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Optimization.Views-3.3", "HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj", "{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}" 19 21 EndProject 20 22 Global … … 80 82 {1CC61973-7706-42DC-8023-310F591AB02B}.Release|x64.ActiveCfg = Release|Any CPU 81 83 {1CC61973-7706-42DC-8023-310F591AB02B}.Release|x86.ActiveCfg = Release|Any CPU 84 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 85 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Debug|Any CPU.Build.0 = Debug|Any CPU 86 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Debug|x64.ActiveCfg = Debug|x64 87 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Debug|x64.Build.0 = Debug|x64 88 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Debug|x86.ActiveCfg = Debug|x86 89 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Debug|x86.Build.0 = Debug|x86 90 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Release|Any CPU.ActiveCfg = Release|Any CPU 91 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Release|Any CPU.Build.0 = Release|Any CPU 92 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Release|x64.ActiveCfg = Release|x64 93 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Release|x64.Build.0 = Release|x64 94 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Release|x86.ActiveCfg = Release|x86 95 {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Release|x86.Build.0 = Release|x86 82 96 EndGlobalSection 83 97 GlobalSection(SolutionProperties) = preSolution -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj
r7558 r7610 50 50 <DebugType>pdbonly</DebugType> 51 51 <Optimize>true</Optimize> 52 <OutputPath> $(SolutionDir)\bin\</OutputPath>52 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 53 53 <DefineConstants>TRACE</DefineConstants> 54 54 <ErrorReport>prompt</ErrorReport> … … 99 99 </PropertyGroup> 100 100 <ItemGroup> 101 <Reference Include="HeuristicLab.Collections-3.3"> 102 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath> 103 </Reference> 104 <Reference Include="HeuristicLab.Common-3.3"> 105 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath> 106 </Reference> 107 <Reference Include="HeuristicLab.Common.Resources-3.3"> 108 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath> 109 </Reference> 110 <Reference Include="HeuristicLab.Core-3.3"> 111 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 112 </Reference> 113 <Reference Include="HeuristicLab.Core.Views-3.3"> 114 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath> 115 </Reference> 116 <Reference Include="HeuristicLab.Data-3.3"> 117 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath> 118 </Reference> 119 <Reference Include="HeuristicLab.Data.Views-3.3"> 120 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data.Views-3.3.dll</HintPath> 121 </Reference> 122 <Reference Include="HeuristicLab.MainForm-3.3"> 123 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath> 124 </Reference> 125 <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3"> 126 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath> 127 </Reference> 128 <Reference Include="HeuristicLab.Optimization-3.3"> 129 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 130 </Reference> 131 <Reference Include="HeuristicLab.Persistence-3.3"> 132 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 133 </Reference> 134 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 135 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 136 </Reference> 137 <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3"> 138 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll</HintPath> 139 </Reference> 101 140 <Reference Include="Microsoft.CSharp" /> 102 141 <Reference Include="System" /> … … 115 154 <Reference Include="System.Data" /> 116 155 <Reference Include="System.Xml" /> 117 <Reference Include="WeifenLuo.WinFormsUI.Docking-2.3.1, Version=2.3.1.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86" /> 156 <Reference Include="WeifenLuo.WinFormsUI.Docking-2.3.1"> 157 <HintPath>..\..\..\..\trunk\sources\bin\WeifenLuo.WinFormsUI.Docking-2.3.1.dll</HintPath> 158 </Reference> 118 159 </ItemGroup> 119 160 <ItemGroup> … … 289 330 </ItemGroup> 290 331 <ItemGroup> 291 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">292 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>293 <Name>HeuristicLab.Collections-3.3</Name>294 <Private>False</Private>295 </ProjectReference>296 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">297 <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>298 <Name>HeuristicLab.Common.Resources-3.3</Name>299 <Private>False</Private>300 </ProjectReference>301 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">302 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>303 <Name>HeuristicLab.Common-3.3</Name>304 <Private>False</Private>305 </ProjectReference>306 <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">307 <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>308 <Name>HeuristicLab.Core.Views-3.3</Name>309 <Private>False</Private>310 </ProjectReference>311 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">312 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>313 <Name>HeuristicLab.Core-3.3</Name>314 <Private>False</Private>315 </ProjectReference>316 <ProjectReference Include="..\..\HeuristicLab.Data.Views\3.3\HeuristicLab.Data.Views-3.3.csproj">317 <Project>{72104A0B-90E7-42F3-9ABE-9BBBADD4B943}</Project>318 <Name>HeuristicLab.Data.Views-3.3</Name>319 <Private>False</Private>320 </ProjectReference>321 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">322 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>323 <Name>HeuristicLab.Data-3.3</Name>324 <Private>False</Private>325 </ProjectReference>326 <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">327 <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>328 <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name>329 <Private>False</Private>330 </ProjectReference>331 <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj">332 <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>333 <Name>HeuristicLab.MainForm-3.3</Name>334 <Private>False</Private>335 </ProjectReference>336 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">337 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>338 <Name>HeuristicLab.Optimization-3.3</Name>339 <Private>False</Private>340 </ProjectReference>341 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">342 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>343 <Name>HeuristicLab.Persistence-3.3</Name>344 <Private>False</Private>345 </ProjectReference>346 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">347 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>348 <Name>HeuristicLab.PluginInfrastructure-3.3</Name>349 <Private>False</Private>350 </ProjectReference>351 332 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 352 333 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 353 334 <Name>HeuristicLab.Problems.Instances-3.3</Name> 354 </ProjectReference>355 <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj">356 <Project>{315BDA09-3F4F-49B3-9790-B37CFC1C5750}</Project>357 <Name>HeuristicLab.Visualization.ChartControlsExtensions-3.3</Name>358 <Private>False</Private>359 335 </ProjectReference> 360 336 </ItemGroup> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/ProblemInstanceProviderView.Designer.cs
r7558 r7610 52 52 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 53 53 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 54 this.exportButton = new System.Windows.Forms.Button(); 55 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); 54 56 this.SuspendLayout(); 55 57 // … … 57 59 // 58 60 this.loadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 59 this.loadButton.Location = new System.Drawing.Point( 549, -1);61 this.loadButton.Location = new System.Drawing.Point(601, -1); 60 62 this.loadButton.Name = "loadButton"; 61 63 this.loadButton.Size = new System.Drawing.Size(26, 23); … … 76 78 // instancesComboBox 77 79 // 78 this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 80 this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 79 81 | System.Windows.Forms.AnchorStyles.Right))); 80 82 this.instancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; … … 82 84 this.instancesComboBox.Location = new System.Drawing.Point(54, 0); 83 85 this.instancesComboBox.Name = "instancesComboBox"; 84 this.instancesComboBox.Size = new System.Drawing.Size( 489, 21);86 this.instancesComboBox.Size = new System.Drawing.Size(541, 21); 85 87 this.instancesComboBox.TabIndex = 7; 86 88 this.instancesComboBox.DataSourceChanged += new System.EventHandler(this.comboBox_DataSourceChanged); … … 89 91 // 90 92 this.importButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 91 this.importButton.Location = new System.Drawing.Point( 581, -1);93 this.importButton.Location = new System.Drawing.Point(633, -1); 92 94 this.importButton.Name = "importButton"; 93 95 this.importButton.Size = new System.Drawing.Size(26, 23); … … 102 104 this.openFileDialog.Filter = "All files|*.*"; 103 105 // 106 // exportButton 107 // 108 this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 109 this.exportButton.Location = new System.Drawing.Point(665, -1); 110 this.exportButton.Name = "exportButton"; 111 this.exportButton.Size = new System.Drawing.Size(26, 23); 112 this.exportButton.TabIndex = 8; 113 this.exportButton.Text = "Export"; 114 this.exportButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 115 this.exportButton.UseVisualStyleBackColor = true; 116 this.exportButton.Click += new System.EventHandler(this.exportButton_Click); 117 // 118 // saveFileDialog 119 // 120 this.saveFileDialog.Filter = "CSV files|*.csv|All files|*.*"; 121 this.saveFileDialog.Title = "Save RegressionInstance..."; 122 // 104 123 // ProblemInstanceProviderView 105 124 // 106 125 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 107 126 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 127 this.Controls.Add(this.exportButton); 108 128 this.Controls.Add(this.instancesComboBox); 109 129 this.Controls.Add(this.importButton); … … 111 131 this.Controls.Add(this.instanceLabel); 112 132 this.Name = "ProblemInstanceProviderView"; 113 this.Size = new System.Drawing.Size(6 10, 21);133 this.Size = new System.Drawing.Size(694, 21); 114 134 this.ResumeLayout(false); 115 135 this.PerformLayout(); … … 125 145 protected System.Windows.Forms.ComboBox instancesComboBox; 126 146 protected System.Windows.Forms.Button importButton; 147 protected System.Windows.Forms.Button exportButton; 148 private System.Windows.Forms.SaveFileDialog saveFileDialog; 127 149 128 150 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/ProblemInstanceProviderView.cs
r7558 r7610 27 27 using HeuristicLab.MainForm; 28 28 using HeuristicLab.MainForm.WindowsForms; 29 using HeuristicLab.PluginInfrastructure; 29 30 using HeuristicLab.Problems.Instances; 30 31 … … 44 45 importButton.Image = VSImageLibrary.Open; 45 46 toolTip.SetToolTip(importButton, "Import a " + GetProblemType() + " instance from file."); 47 exportButton.Text = String.Empty; 48 exportButton.Image = VSImageLibrary.Save; 49 toolTip.SetToolTip(exportButton, "Export a " + GetProblemType() + " instance to a file."); 46 50 loadButton.Text = String.Empty; 47 51 loadButton.Image = VSImageLibrary.Checkout; … … 70 74 try { 71 75 Content.Consumer.Load(instance); 72 } catch (Exception ex) { 76 } 77 catch (Exception ex) { 73 78 MessageBox.Show(String.Format("This problem does not support loading the instance {0}: {1}", descriptor.Name, Environment.NewLine + ex.Message), "Cannot load instance"); 74 79 } … … 81 86 try { 82 87 instance = Content.LoadData(openFileDialog.FileName); 83 } catch (Exception ex) { 88 } 89 catch (Exception ex) { 84 90 MessageBox.Show(String.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error); 85 91 return; … … 87 93 try { 88 94 Content.Consumer.Load(instance); 89 } catch (Exception ex) { 95 } 96 catch (Exception ex) { 90 97 MessageBox.Show(String.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(openFileDialog.FileName), Environment.NewLine + ex.Message), "Cannot load instance"); 98 } 99 } 100 } 101 102 protected virtual void exportButton_Click(object sender, EventArgs e) { 103 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { 104 try { 105 var descriptor = (IDataDescriptor)instancesComboBox.SelectedItem; 106 var instance = Content.LoadData(descriptor); 107 Content.SaveData(instance, saveFileDialog.FileName); 108 } 109 catch (Exception ex) { 110 ErrorHandling.ShowErrorDialog(this, ex); 91 111 } 92 112 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.cs
r7603 r7610 29 29 [View("DataAnalysisProblem View")] 30 30 [Content(typeof(IDataAnalysisProblem), true)] 31 public partial class DataAnalysisProblemView : HeuristicOptimizationProblemView {31 public partial class DataAnalysisProblemView : ProblemView { 32 32 public DataAnalysisProblemView() { 33 33 InitializeComponent(); -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r7603 r7610 123 123 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 124 124 </Reference> 125 <Reference Include="HeuristicLab.Optimization.Views-3.3">126 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Views-3.3.dll</HintPath>127 </Reference>128 125 <Reference Include="HeuristicLab.Optimizer-3.3"> 129 126 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimizer-3.3.dll</HintPath> … … 177 174 </Compile> 178 175 <Compile Include="Plugin.cs" /> 176 <Compile Include="Regression\RegressionProblemView.cs"> 177 <SubType>UserControl</SubType> 178 </Compile> 179 <Compile Include="Regression\RegressionProblemView.Designer.cs"> 180 <DependentUpon>RegressionProblemView.cs</DependentUpon> 181 </Compile> 179 182 <Compile Include="Regression\RegressionSolutionErrorCharacteristicsCurveView.cs"> 180 183 <SubType>UserControl</SubType> … … 308 311 <None Include="Plugin.cs.frame" /> 309 312 <None Include="Properties\AssemblyInfo.cs.frame" /> 310 <Compile Include="DataAnalysisProblemView.cs" /> 313 <Compile Include="DataAnalysisProblemView.cs"> 314 <SubType>UserControl</SubType> 315 </Compile> 311 316 <Compile Include="DataAnalysisProblemView.Designer.cs"> 312 317 <DependentUpon>DataAnalysisProblemView.cs</DependentUpon> … … 315 320 </ItemGroup> 316 321 <ItemGroup> 322 <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj"> 323 <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project> 324 <Name>HeuristicLab.Optimization.Views-3.3</Name> 325 </ProjectReference> 317 326 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 318 327 <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project> 319 328 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 320 329 <Private>False</Private> 330 </ProjectReference> 331 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 332 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 333 <Name>HeuristicLab.Problems.Instances-3.3</Name> 321 334 </ProjectReference> 322 335 </ItemGroup> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4/Plugin.cs.frame
r7603 r7610 43 43 [PluginDependency("HeuristicLab.Persistence", "3.3")] 44 44 [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")] 45 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] 45 46 [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")] 46 47 public class HeuristicLabProblemsDataAnalysisViewsPlugin : PluginBase { -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs
r7603 r7610 29 29 [Item("Regression Problem", "A general regression problem.")] 30 30 [Creatable("Problems")] 31 public class RegressionProblem : DataAnalysisProblem<IRegressionProblemData>, IRegressionProblem, IStorableContent { 31 public class RegressionProblem : DataAnalysisProblem<IRegressionProblemData>, IRegressionProblem, IStorableContent, 32 IProblemInstanceConsumer<RegressionData> { 32 33 public string Filename { get; set; } 33 34 … … 52 53 Dataset dataset = new Dataset(data.InputVariables, data.Values); 53 54 ProblemData = new RegressionProblemData(dataset, data.AllowedInputVariables, data.TargetVariable); 55 ProblemData.TrainingPartition.Start = data.TrainingPartitionStart; 56 ProblemData.TrainingPartition.End = data.TrainingPartitionEnd; 57 ProblemData.TestPartition.Start = data.TestPartitionStart; 58 ProblemData.TestPartition.End = data.TestPartitionEnd; 54 59 OnReset(); 55 60 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblem.cs
r7603 r7610 20 20 #endregion 21 21 22 using HeuristicLab.Problems.Instances;23 22 namespace HeuristicLab.Problems.DataAnalysis { 24 public interface IRegressionProblem : IDataAnalysisProblem<IRegressionProblemData> , IProblemInstanceConsumer<RegressionData>{23 public interface IRegressionProblem : IDataAnalysisProblem<IRegressionProblemData> { 25 24 } 26 25 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression.Views/3.4
-
Property
svn:ignore
set to
Plugin.cs
bin
obj
-
Property
svn:ignore
set to
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression.Views/3.4/HeuristicLab.Problems.Instances.Regression.Views-3.4.csproj
r7603 r7610 41 41 <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 42 42 <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 43 <Reference Include="HeuristicLab. Optimization.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />43 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 44 44 <Reference Include="System" /> 45 45 <Reference Include="System.Core" /> … … 53 53 </ItemGroup> 54 54 <ItemGroup> 55 <Compile Include="Plugin.cs" /> 55 56 <Compile Include="Properties\AssemblyInfo.cs" /> 56 57 <Compile Include="RegressionInstanceProviderView.cs"> … … 67 68 </ItemGroup> 68 69 <ItemGroup> 70 <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj"> 71 <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project> 72 <Name>HeuristicLab.Optimization.Views-3.3</Name> 73 </ProjectReference> 69 74 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.Regression\3.4\HeuristicLab.Problems.Instances.Regression-3.4.csproj"> 70 75 <Project>{26BF13E1-C8B2-4ACE-862D-EBFD360116B3}</Project> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression.Views/3.4/Properties/AssemblyInfo.cs
r7603 r7610 1 using System.Reflection; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Reflection; 2 23 using System.Runtime.CompilerServices; 3 24 using System.Runtime.InteropServices; … … 6 27 // set of attributes. Change these attribute values to modify the information 7 28 // associated with an assembly. 8 [assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Regression.View s-3.4")]29 [assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Regression.View")] 9 30 [assembly: AssemblyDescription("")] 10 31 [assembly: AssemblyConfiguration("")] 11 [assembly: AssemblyCompany(" ")]12 [assembly: AssemblyProduct("HeuristicLab .Problems.Instances.Regression.Views-3.4")]13 [assembly: AssemblyCopyright(" Copyright © 2012")]32 [assembly: AssemblyCompany("HEAL")] 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-2012 HEAL")] 14 35 [assembly: AssemblyTrademark("")] 15 36 [assembly: AssemblyCulture("")] … … 33 54 // by using the '*' as shown below: 34 55 // [assembly: AssemblyVersion("1.0.*")] 35 [assembly: AssemblyVersion(" 1.0.0.0")]36 [assembly: AssemblyFileVersion(" 1.0.0.0")]56 [assembly: AssemblyVersion("3.4.0.0")] 57 [assembly: AssemblyFileVersion("3.4.0.7603")] -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4
-
Property
svn:ignore
set to
Plugin.cs
bin
obj
-
Property
svn:ignore
set to
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/HeuristicLab.Problems.Instances.Regression-3.4.csproj
r7603 r7610 40 40 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 41 41 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 42 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 42 43 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 43 44 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> … … 52 53 <ItemGroup> 53 54 <Compile Include="Keijzer\KeijzerFunctionEight.cs" /> 55 <Compile Include="Plugin.cs" /> 54 56 <Compile Include="ResourceRegressionInstanceProvider.cs" /> 55 57 <Compile Include="ArtificialRegressionInstanceProvider.cs" /> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Keijzer/KeijzerInstanceProvider.cs
r7603 r7610 20 20 #endregion 21 21 22 23 22 using System; 24 23 using System.Collections.Generic; 24 25 25 namespace HeuristicLab.Problems.Instances.Regression { 26 public class KeijzerInstanceProvider : ArtificialRegressionInstanceProvider {26 public class KeijzerInstanceProvider : ArtificialRegressionInstanceProvider, IProblemInstanceProvider<RegressionData> { 27 27 public override string Name { 28 28 get { return "Keijzer Benchmark Problems"; } … … 43 43 return descriptorList; 44 44 } 45 46 /*#region delete after test 47 public RegressionData LoadData(IDataDescriptor descriptor) { 48 throw new NotImplementedException(); 49 } 50 51 public RegressionData LoadData(string path) { 52 TableFileParser csvFileParser = new TableFileParser(); 53 csvFileParser.Parse(path); 54 55 RegressionData regData = new RegressionData(); 56 regData.Name = path; 57 regData.InputVariables = new List<string>(csvFileParser.VariableNames); 58 regData.TargetVariable = csvFileParser.VariableNames.Last(); 59 //convert to multidimensional array 60 double[][] values = csvFileParser.Values.Cast<double[]>().ToArray(); 61 regData.Values = new double[values.GetLength(0), values.GetLength(1)]; 62 for (int i = 0; i < values.GetLength(0); i++) { 63 for (int j = 0; j < values.GetLength(1); j++) { 64 regData.Values[i, j] = values[i][j]; 65 } 66 } 67 68 int trainingPartEnd = csvFileParser.Rows * 2 / 3; 69 regData.TrainingPartitionStart = 0; 70 regData.TrainingPartitionEnd = trainingPartEnd; 71 regData.TestPartitionStart = trainingPartEnd; 72 regData.TestPartitionEnd = csvFileParser.Rows; 73 return regData; 74 } 75 76 public void SaveData(RegressionData instance, string path) { 77 StringBuilder strBuilder = new StringBuilder(); 78 79 foreach (var variable in instance.InputVariables) { 80 strBuilder.Append(variable + ";"); 81 } 82 strBuilder.Remove(strBuilder.Length - 1, 1); 83 strBuilder.AppendLine(); 84 85 double[,] values = instance.Values; 86 87 for (int i = 0; i < values.GetLength(0); i++) { 88 for (int j = 0; j < values.GetLength(1); j++) { 89 strBuilder.Append(values[i, j] + ";"); 90 } 91 strBuilder.Remove(strBuilder.Length - 1, 1); 92 strBuilder.AppendLine(); 93 } 94 95 using (StreamWriter writer = new StreamWriter(path)) { 96 writer.Write(strBuilder); 97 } 98 } 99 #endregion 100 101 #region IProblemInstanceProvider<RegressionData> Members 102 103 public IProblemInstanceConsumer<RegressionData> Consumer { 104 get { 105 return new RegressionProblem(); 106 } 107 set { 108 throw new NotImplementedException(); 109 } 110 } 111 112 #endregion */ 45 113 } 46 114 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Properties/AssemblyInfo.cs
r7603 r7610 1 using System.Reflection; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Reflection; 2 23 using System.Runtime.CompilerServices; 3 24 using System.Runtime.InteropServices; … … 6 27 // set of attributes. Change these attribute values to modify the information 7 28 // associated with an assembly. 8 [assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Regression -3.4")]29 [assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Regression")] 9 30 [assembly: AssemblyDescription("")] 10 31 [assembly: AssemblyConfiguration("")] 11 [assembly: AssemblyCompany(" ")]12 [assembly: AssemblyProduct("HeuristicLab .Problems.Instances.Regression-3.4")]13 [assembly: AssemblyCopyright(" Copyright © 2012")]32 [assembly: AssemblyCompany("HEAL")] 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-2012 HEAL")] 14 35 [assembly: AssemblyTrademark("")] 15 36 [assembly: AssemblyCulture("")] … … 33 54 // by using the '*' as shown below: 34 55 // [assembly: AssemblyVersion("1.0.*")] 35 [assembly: AssemblyVersion(" 1.0.0.0")]36 [assembly: AssemblyFileVersion(" 1.0.0.0")]56 [assembly: AssemblyVersion("3.4.0.0")] 57 [assembly: AssemblyFileVersion("3.4.0.7603")] -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/RegressionInstanceProvider.cs
r7603 r7610 21 21 22 22 using System; 23 using System.Collections; 23 24 using System.Collections.Generic; 24 25 using System.IO; … … 33 34 34 35 RegressionData regData = new RegressionData(); 35 regData.Name = path; 36 int pos = path.LastIndexOf('\\'); 37 if (pos < 0) 38 regData.Name = path; 39 else { 40 pos++; 41 regData.Name = path.Substring(pos, path.Length - pos); 42 } 36 43 regData.InputVariables = new List<string>(csvFileParser.VariableNames); 37 44 regData.TargetVariable = csvFileParser.VariableNames.Last(); 45 regData.AllowedInputVariables = regData.InputVariables.Where(x => !x.Equals(regData.TargetVariable)); 38 46 //convert to multidimensional array 39 double[][] values = csvFileParser.Values.Cast<double[]>().ToArray();40 regData.Values = new double[values. GetLength(0), values.GetLength(1)];41 for (int i = 0; i < values. GetLength(0); i++) {42 for (int j = 0; j < values. GetLength(1); j++) {43 regData.Values[ i, j] =values[i][j];47 List<IList> values = csvFileParser.Values; 48 regData.Values = new double[values.First().Count, values.Count]; 49 for (int i = 0; i < values.Count; i++) { 50 for (int j = 0; j < values.First().Count; j++) { 51 regData.Values[j, i] = (double)values[i][j]; 44 52 } 45 53 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/ValueGenerator.cs
r7603 r7610 30 30 31 31 public static double[,] Transformation(List<List<double>> data) { 32 double[,] values = new double[data. Count, data.First().Count];32 double[,] values = new double[data.First().Count, data.Count]; 33 33 for (int i = 0; i < values.GetLength(0); i++) { 34 34 for (int j = 0; j < values.GetLength(1); j++) { 35 values[i, j] = data[ i][j];35 values[i, j] = data[j][i]; 36 36 } 37 37 }
Note: See TracChangeset
for help on using the changeset viewer.