Changeset 11203 for branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Timestamp:
- 07/18/14 12:35:00 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 5 deleted
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll11 10 HeuristicLab 3.3.5.1.ReSharper.user 12 11 HeuristicLab 3.3.6.0.ReSharper.user 13 12 HeuristicLab.4.5.resharper.user 14 13 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development16 14 HeuristicLab.resharper.user 17 15 ProtoGen.exe … … 19 17 _ReSharper.HeuristicLab 20 18 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests22 19 _ReSharper.HeuristicLab.ExtLibs 23 20 bin 24 21 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
r11202 r11203 120 120 <Compile Include="Plugin.cs" /> 121 121 <Compile Include="SingleObjective\ConstantOptimizationAnalyzer.cs" /> 122 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" />123 <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" />124 <Compile Include="SymbolicRegressionPruningAnalyzer.cs" />125 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionLogResidualEvaluator.cs" />126 122 <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer.cs" /> 127 123 <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs" /> … … 147 143 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs" /> 148 144 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs" /> 149 <Compile Include="SymbolicRegressionPruningOperator.cs" />150 145 <Compile Include="SymbolicRegressionSolution.cs" /> 151 146 <Compile Include="SymbolicRegressionSolutionImpactValuesCalculator.cs" /> -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionModel.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 22 22 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 23 23 public interface ISymbolicRegressionModel : IRegressionModel, ISymbolicDataAnalysisModel { 24 double LowerEstimationLimit { get; } 25 double UpperEstimationLimit { get; } 26 24 27 void Scale(IRegressionProblemData problemData); 25 28 } -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionMultiObjectiveEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionSingleObjectiveEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionSolution.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 44 44 public override IEnumerable<bool> Maximization { get { return new bool[2] { false, false }; } } 45 45 46 public override IOperation InstrumentedApply() {46 public override Core.IOperation Apply() { 47 47 IEnumerable<int> rows = GenerateRowsToEvaluate(); 48 48 var solution = SymbolicExpressionTreeParameter.ActualValue; 49 49 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value); 50 50 QualitiesParameter.ActualValue = new DoubleArray(qualities); 51 return base. InstrumentedApply();51 return base.Apply(); 52 52 } 53 53 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 44 44 public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } } 45 45 46 public override IOperation InstrumentedApply() {46 public override IOperation Apply() { 47 47 IEnumerable<int> rows = GenerateRowsToEvaluate(); 48 48 var solution = SymbolicExpressionTreeParameter.ActualValue; 49 49 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value); 50 50 QualitiesParameter.ActualValue = new DoubleArray(qualities); 51 return base. InstrumentedApply();51 return base.Apply(); 52 52 } 53 53 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Plugin.cs.frame
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 26 26 27 27 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 28 [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression","Provides classes to perform symbolic regression (single- or multiobjective).", "3.4. 6.$WCREV$")]28 [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression","Provides classes to perform symbolic regression (single- or multiobjective).", "3.4.3.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")] -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Properties/AssemblyInfo.cs.frame
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [assembly: AssemblyCompany("")] 32 32 [assembly: AssemblyProduct("HeuristicLab")] 33 [assembly: AssemblyCopyright("(c) 2002-201 4HEAL")]33 [assembly: AssemblyCopyright("(c) 2002-2012 HEAL")] 34 34 [assembly: AssemblyTrademark("")] 35 35 [assembly: AssemblyCulture("")] … … 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.4.0.0")] 55 [assembly: AssemblyFileVersion("3.4. 6.$WCREV$")]55 [assembly: AssemblyFileVersion("3.4.3.$WCREV$")] -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/ConstantOptimizationAnalyzer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 102 102 } 103 103 104 public override IOperation InstrumentedApply() {104 public override IOperation Apply() { 105 105 var solution = SymbolicExpressionTreeParameter.ActualValue; 106 106 double quality; … … 121 121 QualityParameter.ActualValue = new DoubleValue(quality); 122 122 123 return base.InstrumentedApply(); 123 if (Successor != null) 124 return ExecutionContext.CreateOperation(Successor); 125 else 126 return null; 124 127 } 125 128 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveMaxAbsoluteErrorEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 42 42 public SymbolicRegressionSingleObjectiveMaxAbsoluteErrorEvaluator() : base() { } 43 43 44 public override IOperation InstrumentedApply() {44 public override IOperation Apply() { 45 45 var solution = SymbolicExpressionTreeParameter.ActualValue; 46 46 IEnumerable<int> rows = GenerateRowsToEvaluate(); … … 49 49 QualityParameter.ActualValue = new DoubleValue(quality); 50 50 51 return base. InstrumentedApply();51 return base.Apply(); 52 52 } 53 53 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveMeanAbsoluteErrorEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 42 42 public SymbolicRegressionSingleObjectiveMeanAbsoluteErrorEvaluator() : base() { } 43 43 44 public override IOperation InstrumentedApply() {44 public override IOperation Apply() { 45 45 var solution = SymbolicExpressionTreeParameter.ActualValue; 46 46 IEnumerable<int> rows = GenerateRowsToEvaluate(); … … 49 49 QualityParameter.ActualValue = new DoubleValue(quality); 50 50 51 return base. InstrumentedApply();51 return base.Apply(); 52 52 } 53 53 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 42 42 public SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator() : base() { } 43 43 44 public override IOperation InstrumentedApply() {44 public override IOperation Apply() { 45 45 var solution = SymbolicExpressionTreeParameter.ActualValue; 46 46 IEnumerable<int> rows = GenerateRowsToEvaluate(); … … 49 49 QualityParameter.ActualValue = new DoubleValue(quality); 50 50 51 return base. InstrumentedApply();51 return base.Apply(); 52 52 } 53 53 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 44 44 public override bool Maximization { get { return true; } } 45 45 46 public override IOperation InstrumentedApply() {46 public override IOperation Apply() { 47 47 var solution = SymbolicExpressionTreeParameter.ActualValue; 48 48 IEnumerable<int> rows = GenerateRowsToEvaluate(); … … 51 51 QualityParameter.ActualValue = new DoubleValue(quality); 52 52 53 return base. InstrumentedApply();53 return base.Apply(); 54 54 } 55 55 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 84 84 IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator); 85 85 double[] validationQuality = SymbolicExpressionTree 86 .AsParallel() 86 87 .Select(t => evaluator.Evaluate(childContext, t, problemData, rows)) 87 88 .ToArray(); -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 86 86 changed = true; 87 87 } 88 if (!Operators.OfType<SymbolicRegressionSolutionsAnalyzer>().Any()) {89 Operators.Add(new SymbolicRegressionSolutionsAnalyzer());90 changed = true;91 }92 88 if (changed) { 93 89 ParameterizeOperators(); … … 110 106 Operators.Add(new SymbolicRegressionSingleObjectiveTrainingParetoBestSolutionAnalyzer()); 111 107 Operators.Add(new SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer()); 112 Operators.Add(new SymbolicRegressionSolutionsAnalyzer());113 108 114 109 ParameterizeOperators(); -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveValidationBestSolutionAnalyzer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 33 33 [Item(Name = "Symbolic Regression Model", Description = "Represents a symbolic regression model.")] 34 34 public class SymbolicRegressionModel : SymbolicDataAnalysisModel, ISymbolicRegressionModel { 35 35 [Storable] 36 private double lowerEstimationLimit; 37 public double LowerEstimationLimit { get { return lowerEstimationLimit; } } 38 [Storable] 39 private double upperEstimationLimit; 40 public double UpperEstimationLimit { get { return upperEstimationLimit; } } 36 41 37 42 [StorableConstructor] 38 43 protected SymbolicRegressionModel(bool deserializing) : base(deserializing) { } 39 protected SymbolicRegressionModel(SymbolicRegressionModel original, Cloner cloner) : base(original, cloner) { } 40 44 protected SymbolicRegressionModel(SymbolicRegressionModel original, Cloner cloner) 45 : base(original, cloner) { 46 this.lowerEstimationLimit = original.lowerEstimationLimit; 47 this.upperEstimationLimit = original.upperEstimationLimit; 48 } 41 49 public SymbolicRegressionModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, 42 50 double lowerEstimationLimit = double.MinValue, double upperEstimationLimit = double.MaxValue) 43 : base(tree, interpreter, lowerEstimationLimit, upperEstimationLimit) { } 51 : base(tree, interpreter) { 52 this.lowerEstimationLimit = lowerEstimationLimit; 53 this.upperEstimationLimit = upperEstimationLimit; 54 } 44 55 45 56 public override IDeepCloneable Clone(Cloner cloner) { … … 49 60 public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) { 50 61 return Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, rows) 51 .LimitToRange( LowerEstimationLimit, UpperEstimationLimit);62 .LimitToRange(lowerEstimationLimit, upperEstimationLimit); 52 63 } 53 64 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolutionImpactValuesCalculator.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 using HeuristicLab.Common; 25 using HeuristicLab.Core;26 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 25 29 26 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 30 [StorableClass]31 [Item("SymbolicRegressionSolutionImpactValuesCalculator", "Calculate symbolic expression tree node impact values for regression problems.")]32 27 public class SymbolicRegressionSolutionImpactValuesCalculator : SymbolicDataAnalysisSolutionImpactValuesCalculator { 33 public SymbolicRegressionSolutionImpactValuesCalculator() { }34 35 protected SymbolicRegressionSolutionImpactValuesCalculator(SymbolicRegressionSolutionImpactValuesCalculator original, Cloner cloner)36 : base(original, cloner) { }37 public override IDeepCloneable Clone(Cloner cloner) {38 return new SymbolicRegressionSolutionImpactValuesCalculator(this, cloner);39 }40 41 [StorableConstructor]42 protected SymbolicRegressionSolutionImpactValuesCalculator(bool deserializing) : base(deserializing) { }43 28 public override double CalculateReplacementValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows) { 44 29 var regressionModel = (ISymbolicRegressionModel)model; … … 49 34 50 35 public override double CalculateImpactValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows, double originalQuality = double.NaN) { 51 double impactValue, replacementValue;52 CalculateImpactAndReplacementValues(model, node, problemData, rows, out impactValue, out replacementValue, originalQuality);53 return impactValue;54 }55 56 public override void CalculateImpactAndReplacementValues(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node,57 IDataAnalysisProblemData problemData, IEnumerable<int> rows, out double impactValue, out double replacementValue,58 double originalQuality = Double.NaN) {59 36 var regressionModel = (ISymbolicRegressionModel)model; 60 37 var regressionProblemData = (IRegressionProblemData)problemData; … … 70 47 } 71 48 72 replacementValue = CalculateReplacementValue(regressionModel, node, regressionProblemData, rows);49 var replacementValue = CalculateReplacementValue(regressionModel, node, regressionProblemData, rows); 73 50 var constantNode = new ConstantTreeNode(new Constant()) { Value = replacementValue }; 74 75 51 var cloner = new Cloner(); 52 cloner.RegisterClonedObject(node, constantNode); 76 53 var tempModel = cloner.Clone(regressionModel); 77 var tempModelNode = (ISymbolicExpressionTreeNode)cloner.GetClone(node);78 79 var tempModelParentNode = tempModelNode.Parent;80 int i = tempModelParentNode.IndexOfSubtree(tempModelNode);81 tempModelParentNode.RemoveSubtree(i);82 tempModelParentNode.InsertSubtree(i, constantNode);83 54 84 55 var estimatedValues = tempModel.GetEstimatedValues(dataset, rows); … … 86 57 if (errorState != OnlineCalculatorError.None) newQuality = 0.0; 87 58 88 impactValue =originalQuality - newQuality;59 return originalQuality - newQuality; 89 60 } 61 90 62 } 91 63 }
Note: See TracChangeset
for help on using the changeset viewer.