Changeset 18186 for branches/3040_VectorBasedGP
- Timestamp:
- 01/12/22 14:49:45 (3 years ago)
- Location:
- branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r18092 r18186 176 176 <Compile Include="Mutators\MultiSymbolicDataAnalysisExpressionManipulator.cs" /> 177 177 <Compile Include="Interfaces\ISymbolicDataAnalysisExpressionManipulator.cs" /> 178 <Compile Include="Mutators\SegmentOptimization\SamplingSegmentOptimizationManipulator.cs" /> 178 179 <Compile Include="Mutators\SymbolicDataAnalysisExpressionManipulator.cs" /> 179 180 <Compile Include="Crossovers\SymbolicDataAnalysisExpressionDiversityPreservingCrossover.cs" /> … … 205 206 <Compile Include="Interpreter\SymbolicDataAnalysisExpressionTreeNativeInterpreter.cs" /> 206 207 <Compile Include="Mutators\SubVectorImprovementManipulator.cs" /> 208 <Compile Include="Mutators\SegmentOptimization\SegmentOptimizationMutator.cs" /> 207 209 <Compile Include="SegmentOptimization\SegmentOptimizationProblem.cs" /> 208 210 <Compile Include="Selectors\DiversitySelector.cs" /> … … 463 465 </ProjectReference> 464 466 </ItemGroup> 465 <ItemGroup /> 467 <ItemGroup> 468 <PackageReference Include="OneOf"> 469 <Version>3.0.205</Version> 470 </PackageReference> 471 </ItemGroup> 466 472 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 467 473 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SegmentOptimization/SegmentOptimizationProblem.cs
r18098 r18186 29 29 using HeuristicLab.Optimization; 30 30 using HeuristicLab.Parameters; 31 using HeuristicLab.PluginInfrastructure; 31 32 using HeuristicLab.Problems.Instances; 32 33 using HeuristicLab.Problems.Instances.Types; … … 81 82 }); 82 83 #endregion 84 85 var optMutators = ApplicationManager.Manager.GetInstances<SegmentOptimizationMutator>(); 86 Encoding.ConfigureOperators(optMutators); 87 Operators.AddRange(optMutators); 83 88 } 84 89 private SegmentOptimizationProblem(SegmentOptimizationProblem original, Cloner cloner) … … 126 131 var knownBounds = KnownBoundsParameter.Value; 127 132 var aggregation = aggregationParameter.Value.Value; 128 129 133 var solution = individual.IntegerVector(Encoding.Name); 134 return Evaluate(solution, data, knownBounds, aggregation); 135 } 136 137 public static double Evaluate(IntegerVector solution, DoubleMatrix data, IntRange knownBounds, Aggregation aggregation) { 130 138 var bounds = new IntRange(solution.Min(), solution.Max()); 131 132 139 double target = BoundedAggregation(data, knownBounds, aggregation); 133 140 double prediction = BoundedAggregation(data, bounds, aggregation); 134 135 141 return Math.Pow(target - prediction, 2); 136 142 }
Note: See TracChangeset
for help on using the changeset viewer.