Changeset 16556 for branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Timestamp:
- 01/25/19 10:30:24 (6 years ago)
- Location:
- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
r16499 r16556 41 41 <DebugType>full</DebugType> 42 42 <Optimize>false</Optimize> 43 <OutputPath> $(SolutionDir)\bin\</OutputPath>43 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 44 44 <DefineConstants>DEBUG;TRACE</DefineConstants> 45 45 <ErrorReport>prompt</ErrorReport> … … 103 103 <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath> 104 104 <Private>False</Private> 105 </Reference> 106 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 107 <SpecificVersion>False</SpecificVersion> 108 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 109 </Reference> 110 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 111 <SpecificVersion>False</SpecificVersion> 112 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Collections-3.3.dll</HintPath> 113 </Reference> 114 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 115 <SpecificVersion>False</SpecificVersion> 116 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath> 117 </Reference> 118 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 119 <SpecificVersion>False</SpecificVersion> 120 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath> 121 </Reference> 122 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 123 <SpecificVersion>False</SpecificVersion> 124 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath> 125 </Reference> 126 <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 127 <SpecificVersion>False</SpecificVersion> 128 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath> 129 </Reference> 130 <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 131 <SpecificVersion>False</SpecificVersion> 132 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Operators-3.3.dll</HintPath> 133 </Reference> 134 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 135 <SpecificVersion>False</SpecificVersion> 136 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 137 </Reference> 138 <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 139 <SpecificVersion>False</SpecificVersion> 140 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath> 141 </Reference> 142 <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 143 <SpecificVersion>False</SpecificVersion> 144 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 145 </Reference> 146 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 147 <SpecificVersion>False</SpecificVersion> 148 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 149 </Reference> 150 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 151 <SpecificVersion>False</SpecificVersion> 152 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 153 </Reference> 154 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 155 <SpecificVersion>False</SpecificVersion> 156 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath> 157 </Reference> 158 <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 159 <SpecificVersion>False</SpecificVersion> 160 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 105 161 </Reference> 106 162 <Reference Include="System" /> … … 180 236 </ItemGroup> 181 237 <ItemGroup> 182 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">183 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>184 <Name>HeuristicLab.Analysis-3.3</Name>185 <Private>False</Private>186 </ProjectReference>187 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">188 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>189 <Name>HeuristicLab.Collections-3.3</Name>190 <Private>False</Private>191 </ProjectReference>192 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">193 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>194 <Name>HeuristicLab.Common-3.3</Name>195 <Private>False</Private>196 </ProjectReference>197 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">198 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>199 <Name>HeuristicLab.Core-3.3</Name>200 <Private>False</Private>201 </ProjectReference>202 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">203 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>204 <Name>HeuristicLab.Data-3.3</Name>205 <Private>False</Private>206 </ProjectReference>207 <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">208 <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>209 <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>210 <Private>False</Private>211 </ProjectReference>212 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">213 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>214 <Name>HeuristicLab.Operators-3.3</Name>215 <Private>False</Private>216 </ProjectReference>217 <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">218 <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>219 <Name>HeuristicLab.Optimization.Operators-3.3</Name>220 <Private>False</Private>221 </ProjectReference>222 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">223 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>224 <Name>HeuristicLab.Optimization-3.3</Name>225 <Private>False</Private>226 </ProjectReference>227 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">228 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>229 <Name>HeuristicLab.Parameters-3.3</Name>230 <Private>False</Private>231 </ProjectReference>232 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">233 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>234 <Name>HeuristicLab.Persistence-3.3</Name>235 <Private>False</Private>236 </ProjectReference>237 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">238 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>239 <Name>HeuristicLab.PluginInfrastructure-3.3</Name>240 <Private>False</Private>241 </ProjectReference>242 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">243 <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project>244 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>245 <Private>False</Private>246 </ProjectReference>247 238 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 248 239 <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project> 249 240 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 250 <Private>False</Private>251 </ProjectReference>252 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">253 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>254 <Name>HeuristicLab.Problems.Instances-3.3</Name>255 241 <Private>False</Private> 256 242 </ProjectReference> -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
r15583 r16556 1 #region License Information1 #region License Information 2 2 /* HeuristicLab 3 3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) … … 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using System.Linq; 23 24 using HeuristicLab.Common; … … 27 28 using HeuristicLab.Optimization; 28 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Problems.DataAnalysis.Implementation; 29 31 30 32 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { … … 47 49 private const string TestNaNEvaluationsResultName = "Test NaN Evaluations"; 48 50 51 private const string EstimatedDerivatesResultName = "Derivates of the Model"; 52 private const string EstimatedDerivationInterval = "Interval"; 53 49 54 public new ISymbolicRegressionModel Model { 50 55 get { return (ISymbolicRegressionModel)base.Model; } … … 95 100 private set { ((IntValue)EstimationLimitsResultCollection[TestNaNEvaluationsResultName].Value).Value = value; } 96 101 } 102 103 private ResultCollection EstimatedDerivateResultCollection => 104 (ResultCollection) this[EstimatedDerivatesResultName].Value; 105 106 public NamedIntervals EstimationInterval => 107 (NamedIntervals) EstimatedDerivateResultCollection[EstimatedDerivationInterval].Value; 108 97 109 98 110 [StorableConstructor] … … 119 131 Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults)); 120 132 RecalculateResults(); 133 134 var estimationDerivatesResult = new ResultCollection(); 135 Add(new Result(EstimatedDerivatesResultName, "Results concerning the derivation of symbolic regression solution", estimationDerivatesResult)); 136 CalculateDerivates(estimationDerivatesResult); 121 137 } 122 138 … … 138 154 Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults)); 139 155 CalculateResults(); 156 157 var estimationDerivatesResult = new ResultCollection(); 158 Add(new Result(EstimatedDerivatesResultName, "Results concerning the derivation of symbolic regression solution", estimationDerivatesResult)); 159 CalculateDerivates(estimationDerivatesResult); 140 160 } 141 161 } … … 146 166 } 147 167 168 private void CalculateDerivates(ResultCollection estimationDerivatesResults) { 169 var interpreter = new IntervalInterpreter(); 170 var variableRanges = (ProblemData as RegressionProblemData).VariableRangesParameter.Value.VariableIntervals; 171 var customIntervals = new Dictionary<string, Interval>(); 172 var intervals = new NamedIntervals(); 173 174 foreach (var variable in variableRanges) { 175 customIntervals.Add(variable.Key, new Interval(variable.Value.LowerBound, variable.Value.UpperBound)); 176 } 177 178 foreach (var derivate in customIntervals) { 179 if (derivate.Key != ProblemData.TargetVariable) { 180 var derived = DerivativeCalculator.Derive(Model.SymbolicExpressionTree, derivate.Key); 181 var derivedResultInterval = interpreter.GetSymbolicExressionTreeInterval(derived, customIntervals); 182 intervals.Add(" ∂f/∂" + derivate.Key, 183 new Interval(derivedResultInterval.LowerBound, derivedResultInterval.UpperBound)); 184 } 185 } 186 estimationDerivatesResults.AddOrUpdateResult("Derived Intervals", intervals); 187 188 } 189 148 190 private void CalculateResults() { 149 191 ModelLength = Model.SymbolicExpressionTree.Length;
Note: See TracChangeset
for help on using the changeset viewer.