1 | using HEAL.Attic;
|
---|
2 | using HeuristicLab.Algorithms.OESRALPS.SlidingWindow.Operator;
|
---|
3 | using HeuristicLab.Analysis;
|
---|
4 | using HeuristicLab.Collections;
|
---|
5 | using HeuristicLab.Common;
|
---|
6 | using HeuristicLab.Core;
|
---|
7 | using HeuristicLab.Data;
|
---|
8 | using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
|
---|
9 | using HeuristicLab.Operators;
|
---|
10 | using HeuristicLab.Optimization;
|
---|
11 | using HeuristicLab.Parameters;
|
---|
12 | using HeuristicLab.Problems.DataAnalysis;
|
---|
13 | using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
|
---|
14 | using HeuristicLab.Random;
|
---|
15 | using System;
|
---|
16 | using System.Collections.Generic;
|
---|
17 | using System.Linq;
|
---|
18 | using System.Text;
|
---|
19 | using System.Threading.Tasks;
|
---|
20 |
|
---|
21 | namespace HeuristicLab.Algorithms.OESRALPS.Analyzers.Regression
|
---|
22 | {
|
---|
23 | [Item("SymbolicRegressionSingleObjectiveValidationLayerBestSolutionSlidingWindowAnalyzer", "An operator that analyzes the validation best symbolic regression solution for single objective symbolic regression problems considering each age layer.")]
|
---|
24 | [StorableType("75E2A19A-95B2-4FA4-8544-CF2325B65820")]
|
---|
25 | public class SymbolicRegressionSingleObjectiveValidationLayerBestSolutionSlidingWindowAnalyzer
|
---|
26 | : SymbolicDataAnalysisSingleObjectiveValidationLayerBestSolutionAnalyzer<ISymbolicRegressionSolution, ISymbolicRegressionSingleObjectiveEvaluator, IRegressionProblemData>
|
---|
27 | {
|
---|
28 |
|
---|
29 | [StorableConstructor]
|
---|
30 | protected SymbolicRegressionSingleObjectiveValidationLayerBestSolutionSlidingWindowAnalyzer(StorableConstructorFlag _)
|
---|
31 | : base(_) { }
|
---|
32 | protected SymbolicRegressionSingleObjectiveValidationLayerBestSolutionSlidingWindowAnalyzer(SymbolicRegressionSingleObjectiveValidationLayerBestSolutionSlidingWindowAnalyzer original, Cloner cloner) : base(original, cloner) { }
|
---|
33 | public SymbolicRegressionSingleObjectiveValidationLayerBestSolutionSlidingWindowAnalyzer()
|
---|
34 | : base()
|
---|
35 | {
|
---|
36 | }
|
---|
37 |
|
---|
38 | public override IDeepCloneable Clone(Cloner cloner)
|
---|
39 | {
|
---|
40 | return new SymbolicRegressionSingleObjectiveValidationLayerBestSolutionSlidingWindowAnalyzer(this, cloner);
|
---|
41 | }
|
---|
42 |
|
---|
43 | protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality)
|
---|
44 | {
|
---|
45 | var model = new SymbolicRegressionModel(ProblemDataParameter.ActualValue.TargetVariable, (ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
|
---|
46 | if (ApplyLinearScalingParameter.ActualValue.Value) model.Scale(ProblemDataParameter.ActualValue);
|
---|
47 | return new SymbolicRegressionSolution(model, (IRegressionProblemData)ProblemDataParameter.ActualValue.Clone());
|
---|
48 | }
|
---|
49 | }
|
---|
50 | } |
---|