Changeset 7750
- Timestamp:
- 04/23/12 16:50:08 (13 years ago)
- Location:
- branches/ProblemInstancesRegressionAndClassification
- Files:
-
- 12 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab 3.3.sln
r7682 r7750 21 21 EndProject 22 22 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Instances.Classification-3.4", "HeuristicLab.Problems.Instances.Classification\3.4\HeuristicLab.Problems.Instances.Classification-3.4.csproj", "{1BBFCD5B-8A1C-4225-A682-ADEC7800E683}" 23 EndProject 24 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4", "HeuristicLab.Problems.DataAnalysis.Symbolic.Regression\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj", "{5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}" 25 EndProject 26 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4", "HeuristicLab.Problems.DataAnalysis.Symbolic.Classification\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj", "{05BAE4E1-A9FA-4644-AA77-42558720159E}" 23 27 EndProject 24 28 Global … … 134 138 {1BBFCD5B-8A1C-4225-A682-ADEC7800E683}.Release|x64.ActiveCfg = Release|Any CPU 135 139 {1BBFCD5B-8A1C-4225-A682-ADEC7800E683}.Release|x86.ActiveCfg = Release|Any CPU 140 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 141 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Debug|Any CPU.Build.0 = Debug|Any CPU 142 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 143 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Debug|Mixed Platforms.Build.0 = Debug|x86 144 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Debug|x64.ActiveCfg = Debug|x64 145 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Debug|x64.Build.0 = Debug|x64 146 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Debug|x86.ActiveCfg = Debug|x86 147 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Debug|x86.Build.0 = Debug|x86 148 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Release|Any CPU.ActiveCfg = Release|Any CPU 149 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Release|Any CPU.Build.0 = Release|Any CPU 150 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Release|Mixed Platforms.ActiveCfg = Release|x86 151 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Release|Mixed Platforms.Build.0 = Release|x86 152 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Release|x64.ActiveCfg = Release|x64 153 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Release|x64.Build.0 = Release|x64 154 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Release|x86.ActiveCfg = Release|x86 155 {5AC82412-911B-4FA2-A013-EDC5E3F3FCC2}.Release|x86.Build.0 = Release|x86 156 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 157 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Debug|Any CPU.Build.0 = Debug|Any CPU 158 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 159 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Debug|Mixed Platforms.Build.0 = Debug|x86 160 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Debug|x64.ActiveCfg = Debug|x64 161 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Debug|x64.Build.0 = Debug|x64 162 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Debug|x86.ActiveCfg = Debug|x86 163 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Debug|x86.Build.0 = Debug|x86 164 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Release|Any CPU.ActiveCfg = Release|Any CPU 165 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Release|Any CPU.Build.0 = Release|Any CPU 166 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Release|Mixed Platforms.ActiveCfg = Release|x86 167 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Release|Mixed Platforms.Build.0 = Release|x86 168 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Release|x64.ActiveCfg = Release|x64 169 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Release|x64.Build.0 = Release|x64 170 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Release|x86.ActiveCfg = Release|x86 171 {05BAE4E1-A9FA-4644-AA77-42558720159E}.Release|x86.Build.0 = Release|x86 136 172 EndGlobalSection 137 173 GlobalSection(SolutionProperties) = preSolution -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis (added) merged: 7678,7735-7736,7738
- Property svn:mergeinfo changed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj
r7734 r7750 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> … … 93 93 </PropertyGroup> 94 94 <ItemGroup> 95 <Reference Include="ALGLIB-3.5.0, Version=3.5.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 96 <HintPath>..\..\bin\ALGLIB-3.5.0.dll</HintPath> 97 <Private>False</Private> 95 <Reference Include="ALGLIB-3.5.0"> 96 <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.5.0.dll</HintPath> 97 </Reference> 98 <Reference Include="HeuristicLab.Analysis-3.3"> 99 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 100 </Reference> 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.Core-3.3"> 108 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 109 </Reference> 110 <Reference Include="HeuristicLab.Data-3.3"> 111 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath> 112 </Reference> 113 <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4"> 114 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath> 115 </Reference> 116 <Reference Include="HeuristicLab.Operators-3.3"> 117 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath> 118 </Reference> 119 <Reference Include="HeuristicLab.Optimization-3.3"> 120 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 121 </Reference> 122 <Reference Include="HeuristicLab.Parameters-3.3"> 123 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 124 </Reference> 125 <Reference Include="HeuristicLab.Persistence-3.3"> 126 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 127 </Reference> 128 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 129 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 130 </Reference> 131 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4"> 132 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath> 98 133 </Reference> 99 134 <Reference Include="System" /> … … 149 184 </ItemGroup> 150 185 <ItemGroup> 151 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">152 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>153 <Name>HeuristicLab.Analysis-3.3</Name>154 <Private>False</Private>155 </ProjectReference>156 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">157 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>158 <Name>HeuristicLab.Collections-3.3</Name>159 <Private>False</Private>160 </ProjectReference>161 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">162 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>163 <Name>HeuristicLab.Common-3.3</Name>164 <Private>False</Private>165 </ProjectReference>166 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">167 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>168 <Name>HeuristicLab.Core-3.3</Name>169 <Private>False</Private>170 </ProjectReference>171 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">172 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>173 <Name>HeuristicLab.Data-3.3</Name>174 <Private>False</Private>175 </ProjectReference>176 <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">177 <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>178 <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>179 <Private>False</Private>180 </ProjectReference>181 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">182 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>183 <Name>HeuristicLab.Operators-3.3</Name>184 <Private>False</Private>185 </ProjectReference>186 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">187 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>188 <Name>HeuristicLab.Optimization-3.3</Name>189 <Private>False</Private>190 </ProjectReference>191 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">192 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>193 <Name>HeuristicLab.Parameters-3.3</Name>194 <Private>False</Private>195 </ProjectReference>196 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">197 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>198 <Name>HeuristicLab.Persistence-3.3</Name>199 <Private>False</Private>200 </ProjectReference>201 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">202 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>203 <Name>HeuristicLab.PluginInfrastructure-3.3</Name>204 <Private>False</Private>205 </ProjectReference>206 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">207 <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project>208 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>209 <Private>False</Private>210 </ProjectReference>211 186 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 212 187 <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project> 213 188 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 214 189 <Private>False</Private> 190 </ProjectReference> 191 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 192 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 193 <Name>HeuristicLab.Problems.Instances-3.3</Name> 215 194 </ProjectReference> 216 195 </ItemGroup> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
r7734 r7750 19 19 */ 20 20 #endregion 21 using System; 22 using System.Collections.Generic; 21 23 using System.Linq; 22 24 using HeuristicLab.Common; … … 24 26 using HeuristicLab.Parameters; 25 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Problems.Instances; 26 29 27 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { … … 29 32 [StorableClass] 30 33 [Creatable("Problems")] 31 public class SymbolicClassificationSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IClassificationProblemData, ISymbolicClassificationSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IClassificationProblem { 34 public class SymbolicClassificationSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IClassificationProblemData, ISymbolicClassificationSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IClassificationProblem, 35 IProblemInstanceConsumer<ClassificationData>, IProblemInstanceExporter<ClassificationData> { 32 36 private const double PunishmentFactor = 10; 33 37 private const int InitialMaximumTreeDepth = 8; … … 113 117 ProblemData = problemData; 114 118 } 119 120 public void Load(ClassificationData data) { 121 Name = data.Name; 122 Description = data.Description; 123 Dataset dataset = new Dataset(data.InputVariables, data.Values); 124 ProblemData = new ClassificationProblemData(dataset, data.AllowedInputVariables, data.TargetVariable); 125 ProblemData.TrainingPartition.Start = data.TrainingPartitionStart; 126 ProblemData.TrainingPartition.End = data.TrainingPartitionEnd; 127 ProblemData.TestPartition.Start = data.TestPartitionStart; 128 ProblemData.TestPartition.End = data.TestPartitionEnd; 129 OnReset(); 130 } 131 132 public ClassificationData Export() { 133 if (!ProblemData.InputVariables.Count.Equals(ProblemData.Dataset.DoubleVariables.Count())) 134 throw new ArgumentException("Not all input variables are double variables! (Export only works with double variables)"); 135 136 ClassificationData claData = new ClassificationData(); 137 claData.Name = Name; 138 claData.Description = Description; 139 claData.TargetVariable = ProblemData.TargetVariable; 140 claData.InputVariables = ProblemData.InputVariables.Select(x => x.Value).ToArray(); 141 claData.AllowedInputVariables = ProblemData.AllowedInputVariables.ToArray(); 142 claData.TrainingPartitionStart = ProblemData.TrainingPartition.Start; 143 claData.TrainingPartitionEnd = ProblemData.TrainingPartition.End; 144 claData.TestPartitionStart = ProblemData.TestPartition.Start; 145 claData.TestPartitionEnd = ProblemData.TestPartition.End; 146 147 List<List<double>> data = new List<List<double>>(); 148 foreach (var variable in ProblemData.Dataset.DoubleVariables) { 149 data.Add(ProblemData.Dataset.GetDoubleValues(variable).ToList()); 150 } 151 claData.Values = Transformer.Transformation(data); 152 153 return claData; 154 } 115 155 } 116 156 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
r7734 r7750 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> … … 93 93 </PropertyGroup> 94 94 <ItemGroup> 95 <Reference Include="ALGLIB-3.5.0, Version=3.5.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 96 <HintPath>..\..\bin\ALGLIB-3.5.0.dll</HintPath> 97 <Private>False</Private> 95 <Reference Include="ALGLIB-3.5.0"> 96 <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.5.0.dll</HintPath> 97 </Reference> 98 <Reference Include="HeuristicLab.Analysis-3.3"> 99 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 100 </Reference> 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.Core-3.3"> 108 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 109 </Reference> 110 <Reference Include="HeuristicLab.Data-3.3"> 111 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath> 112 </Reference> 113 <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4"> 114 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath> 115 </Reference> 116 <Reference Include="HeuristicLab.Operators-3.3"> 117 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath> 118 </Reference> 119 <Reference Include="HeuristicLab.Optimization-3.3"> 120 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 121 </Reference> 122 <Reference Include="HeuristicLab.Parameters-3.3"> 123 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 124 </Reference> 125 <Reference Include="HeuristicLab.Persistence-3.3"> 126 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 127 </Reference> 128 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 129 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 130 </Reference> 131 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4"> 132 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath> 98 133 </Reference> 99 134 <Reference Include="System" /> … … 144 179 </ItemGroup> 145 180 <ItemGroup> 146 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">147 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>148 <Name>HeuristicLab.Analysis-3.3</Name>149 <Private>False</Private>150 </ProjectReference>151 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">152 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>153 <Name>HeuristicLab.Collections-3.3</Name>154 <Private>False</Private>155 </ProjectReference>156 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">157 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>158 <Name>HeuristicLab.Common-3.3</Name>159 <Private>False</Private>160 </ProjectReference>161 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">162 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>163 <Name>HeuristicLab.Core-3.3</Name>164 <Private>False</Private>165 </ProjectReference>166 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">167 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>168 <Name>HeuristicLab.Data-3.3</Name>169 <Private>False</Private>170 </ProjectReference>171 <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">172 <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>173 <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>174 <Private>False</Private>175 </ProjectReference>176 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">177 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>178 <Name>HeuristicLab.Operators-3.3</Name>179 <Private>False</Private>180 </ProjectReference>181 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">182 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>183 <Name>HeuristicLab.Optimization-3.3</Name>184 <Private>False</Private>185 </ProjectReference>186 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">187 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>188 <Name>HeuristicLab.Parameters-3.3</Name>189 <Private>False</Private>190 </ProjectReference>191 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">192 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>193 <Name>HeuristicLab.Persistence-3.3</Name>194 <Private>False</Private>195 </ProjectReference>196 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">197 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>198 <Name>HeuristicLab.PluginInfrastructure-3.3</Name>199 <Private>False</Private>200 </ProjectReference>201 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">202 <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project>203 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>204 <Private>False</Private>205 </ProjectReference>206 181 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 207 182 <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project> 208 183 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 209 184 <Private>False</Private> 185 </ProjectReference> 186 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 187 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 188 <Name>HeuristicLab.Problems.Instances-3.3</Name> 210 189 </ProjectReference> 211 190 </ItemGroup> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
r7734 r7750 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 22 24 using System.Linq; 23 25 using HeuristicLab.Common; … … 25 27 using HeuristicLab.Parameters; 26 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Problems.Instances; 27 30 28 31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { … … 30 33 [StorableClass] 31 34 [Creatable("Problems")] 32 public class SymbolicRegressionSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IRegressionProblemData, ISymbolicRegressionSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IRegressionProblem { 35 public class SymbolicRegressionSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IRegressionProblemData, ISymbolicRegressionSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IRegressionProblem, 36 IProblemInstanceConsumer<RegressionData>, IProblemInstanceExporter<RegressionData> { 33 37 private const double PunishmentFactor = 10; 34 38 private const int InitialMaximumTreeDepth = 8; … … 116 120 ProblemData = problemData; 117 121 } 122 123 public void Load(RegressionData data) { 124 Name = data.Name; 125 Description = data.Description; 126 Dataset dataset = new Dataset(data.InputVariables, data.Values); 127 ProblemData = new RegressionProblemData(dataset, data.AllowedInputVariables, data.TargetVariable); 128 ProblemData.TrainingPartition.Start = data.TrainingPartitionStart; 129 ProblemData.TrainingPartition.End = data.TrainingPartitionEnd; 130 ProblemData.TestPartition.Start = data.TestPartitionStart; 131 ProblemData.TestPartition.End = data.TestPartitionEnd; 132 OnReset(); 133 } 134 135 public RegressionData Export() { 136 if (!ProblemData.InputVariables.Count.Equals(ProblemData.Dataset.DoubleVariables.Count())) 137 throw new ArgumentException("Not all input variables are double variables! (Export only works with double variables)"); 138 139 RegressionData regData = new RegressionData(); 140 regData.Name = Name; 141 regData.Description = Description; 142 regData.TargetVariable = ProblemData.TargetVariable; 143 regData.InputVariables = ProblemData.InputVariables.Select(x => x.Value).ToArray(); 144 regData.AllowedInputVariables = ProblemData.AllowedInputVariables.ToArray(); 145 regData.TrainingPartitionStart = ProblemData.TrainingPartition.Start; 146 regData.TrainingPartitionEnd = ProblemData.TrainingPartition.End; 147 regData.TestPartitionStart = ProblemData.TestPartition.Start; 148 regData.TestPartitionEnd = ProblemData.TestPartition.End; 149 150 List<List<double>> data = new List<List<double>>(); 151 foreach (var variable in ProblemData.Dataset.DoubleVariables) { 152 data.Add(ProblemData.Dataset.GetDoubleValues(variable).ToList()); 153 } 154 regData.Values = Transformer.Transformation(data); 155 156 return regData; 157 } 118 158 } 119 159 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r7259 r7750 72 72 rows = variableValues.First().Count; 73 73 this.variableNames = new List<string>(variableNames); 74 this.variableValues = new Dictionary<string, IList>( );74 this.variableValues = new Dictionary<string, IList>(this.variableNames.Count); 75 75 for (int i = 0; i < this.variableNames.Count; i++) { 76 76 var values = variableValues.ElementAt(i); … … 107 107 this.variableNames = new List<string>(variableNames); 108 108 109 this.variableValues = new Dictionary<string, IList>( );109 this.variableValues = new Dictionary<string, IList>(variableValues.GetLength(1)); 110 110 for (int col = 0; col < variableValues.GetLength(1); col++) { 111 111 string columName = this.variableNames[col]; 112 var values = new List<double>( );112 var values = new List<double>(variableValues.GetLength(0)); 113 113 for (int row = 0; row < variableValues.GetLength(0); row++) { 114 114 values.Add(variableValues[row, col]); -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r7687 r7750 177 177 <Compile Include="Interfaces\Regression\IRegressionEnsembleSolution.cs" /> 178 178 <Compile Include="Implementation\Regression\RegressionSolutionBase.cs" /> 179 <Compile Include="OnlineCalculators\OnlineMaxAbsoluteErrorCalculator.cs" /> 179 180 <Compile Include="OnlineCalculators\OnlineMeanErrorCalculator.cs" /> 180 181 <Compile Include="OnlineCalculators\NormalizedGiniCalculator.cs" /> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs
r7683 r7750 33 33 [Creatable("Problems")] 34 34 public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, IClassificationProblem, IStorableContent, 35 IProblemInstanceConsumer<ClassificationData>, IProblemInstanceExporter<ClassificationData> , IProblemInstanceConsumer, IProblemInstanceExporter{35 IProblemInstanceConsumer<ClassificationData>, IProblemInstanceExporter<ClassificationData> { 36 36 public string Filename { get; set; } 37 37 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs
r7259 r7750 97 97 98 98 RegisterRegressionSolutionsEventHandler(); 99 } 100 101 public RegressionEnsembleSolution(IRegressionProblemData problemData) 102 : this(Enumerable.Empty<IRegressionModel>(), problemData) { 99 103 } 100 104 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolution.cs
r7259 r7750 44 44 protected RegressionSolution(IRegressionModel model, IRegressionProblemData problemData) 45 45 : base(model, problemData) { 46 evaluationCache = new Dictionary<int, double>( );46 evaluationCache = new Dictionary<int, double>(problemData.Dataset.Rows); 47 47 } 48 48 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
r7272 r7750 21 21 22 22 using System.Collections.Generic; 23 using System.Linq;24 23 using HeuristicLab.Common; 25 24 using HeuristicLab.Data; … … 166 165 167 166 protected void CalculateResults() { 168 double[] estimatedTrainingValues = EstimatedTrainingValues.ToArray(); // cache values169 double[] originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();170 double[] estimatedTestValues = EstimatedTestValues.ToArray(); // cache values171 double[] originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();167 IEnumerable<double> estimatedTrainingValues = EstimatedTrainingValues; // cache values 168 IEnumerable<double> originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes); 169 IEnumerable<double> estimatedTestValues = EstimatedTestValues; // cache values 170 IEnumerable<double> originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes); 172 171 173 172 OnlineCalculatorError errorState;
Note: See TracChangeset
for help on using the changeset viewer.