Changeset 4722 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers
- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/BestSymbolicRegressionSolutionAnalyzer.cs
r4468 r4722 22 22 using System.Linq; 23 23 using HeuristicLab.Analysis; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Data; … … 67 68 #endregion 68 69 70 [StorableConstructor] 71 private BestSymbolicRegressionSolutionAnalyzer(bool deserializing) : base(deserializing) { } 72 private BestSymbolicRegressionSolutionAnalyzer(BestSymbolicRegressionSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { } 69 73 public BestSymbolicRegressionSolutionAnalyzer() 70 74 : base() { … … 75 79 } 76 80 81 public override IDeepCloneable Clone(Cloner cloner) { 82 return new BestSymbolicRegressionSolutionAnalyzer(this, cloner); 83 } 84 77 85 [StorableHook(HookType.AfterDeserialization)] 78 private void Initialize() {86 private void AfterDeserialization() { 79 87 if (!Parameters.ContainsKey(VariableFrequenciesParameterName)) { 80 88 Parameters.Add(new LookupParameter<DataTable>(VariableFrequenciesParameterName, "The variable frequencies table to use for the calculation of variable impacts")); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs
r4468 r4722 23 23 using System.Linq; 24 24 using HeuristicLab.Analysis; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 26 27 using HeuristicLab.Data; … … 165 166 #endregion 166 167 168 [StorableConstructor] 169 private FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer(bool deserializing) : base(deserializing) { } 170 private FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer(FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { } 167 171 public FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer() 168 172 : base() { … … 186 190 } 187 191 188 [StorableConstructor] 189 private FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer(bool deserializing) : base() { } 192 public override IDeepCloneable Clone(Cloner cloner) { 193 return new FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer(this, cloner); 194 } 190 195 191 196 [StorableHook(HookType.AfterDeserialization)] -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs
r4468 r4722 24 24 using System.Linq; 25 25 using HeuristicLab.Analysis; 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Core; 27 28 using HeuristicLab.Data; … … 118 119 #endregion 119 120 121 [StorableConstructor] 122 private SymbolicRegressionModelQualityAnalyzer(bool deserializing) : base(deserializing) { } 123 private SymbolicRegressionModelQualityAnalyzer(SymbolicRegressionModelQualityAnalyzer original, Cloner cloner) : base(original, cloner) { } 120 124 public SymbolicRegressionModelQualityAnalyzer() 121 125 : base() { … … 131 135 } 132 136 133 [StorableConstructor] 134 private SymbolicRegressionModelQualityAnalyzer(bool deserializing) : base() { } 137 public override IDeepCloneable Clone(Cloner cloner) { 138 return new SymbolicRegressionModelQualityAnalyzer(this, cloner); 139 } 135 140 136 141 public override IOperation Apply() { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityCalculator.cs
r4468 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 83 84 #endregion 84 85 86 [StorableConstructor] 87 private SymbolicRegressionModelQualityCalculator(bool deserializing) : base(deserializing) { } 88 private SymbolicRegressionModelQualityCalculator(SymbolicRegressionModelQualityCalculator original, Cloner cloner) : base(original, cloner) { } 85 89 public SymbolicRegressionModelQualityCalculator() 86 90 : base() { … … 138 142 139 143 } 144 public override IDeepCloneable Clone(Cloner cloner) { 145 return new SymbolicRegressionModelQualityCalculator(this, cloner); 146 } 140 147 } 141 148 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionSolutionLinearScaler.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 53 54 } 54 55 56 [StorableConstructor] 57 private SymbolicRegressionSolutionLinearScaler(bool deserializing) : base(deserializing) { } 58 private SymbolicRegressionSolutionLinearScaler(SymbolicRegressionSolutionLinearScaler original, Cloner cloner) : base(original, cloner) { } 55 59 public SymbolicRegressionSolutionLinearScaler() 56 60 : base() { … … 59 63 Parameters.Add(new LookupParameter<DoubleValue>(AlphaParameterName, "Alpha parameter for linear transformation.")); 60 64 Parameters.Add(new LookupParameter<DoubleValue>(BetaParameterName, "Beta parameter for linear transformation.")); 65 } 66 67 public override IDeepCloneable Clone(Cloner cloner) { 68 return new SymbolicRegressionSolutionLinearScaler(this, cloner); 61 69 } 62 70 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionTournamentPruning.cs
r4468 r4722 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Data; … … 33 34 34 35 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers { 35 public class SymbolicRegressionTournamentPruning : SingleSuccessorOperator, ISymbolicRegressionAnalyzer {36 public sealed class SymbolicRegressionTournamentPruning : SingleSuccessorOperator, ISymbolicRegressionAnalyzer { 36 37 private const string RandomParameterName = "Random"; 37 38 private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree"; … … 176 177 } 177 178 #endregion 178 protected SymbolicRegressionTournamentPruning(bool deserializing) : base(deserializing) { } 179 180 [StorableConstructor] 181 private SymbolicRegressionTournamentPruning(bool deserializing) : base(deserializing) { } 182 private SymbolicRegressionTournamentPruning(SymbolicRegressionTournamentPruning original, Cloner cloner) : base(original, cloner) { } 179 183 public SymbolicRegressionTournamentPruning() 180 184 : base() { … … 201 205 } 202 206 207 public override IDeepCloneable Clone(Cloner cloner) { 208 return new SymbolicRegressionTournamentPruning(this, cloner); 209 } 210 203 211 [StorableHook(HookType.AfterDeserialization)] 204 212 private void AfterDeserialization() { … … 241 249 double lowerEstimationLimit, double upperEstimationLimit, 242 250 double maxPruningRatio, double qualityGainWeight) { 243 244 251 IEnumerable<int> rows = Enumerable.Range(samplesStart, samplesEnd - samplesStart) 252 .Where(i => i < problemData.TestSamplesStart.Value || problemData.TestSamplesEnd.Value <= i); 245 253 int originalSize = tree.Size; 246 254 double originalQuality = evaluator.Evaluate(interpreter, tree, -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionVariableFrequencyAnalyzer.cs
r4068 r4722 22 22 using System.Linq; 23 23 using HeuristicLab.Analysis; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; … … 60 61 #endregion 61 62 63 [StorableConstructor] 64 private SymbolicRegressionVariableFrequencyAnalyzer(bool deserializing) : base(deserializing) { } 65 private SymbolicRegressionVariableFrequencyAnalyzer(SymbolicRegressionVariableFrequencyAnalyzer original, Cloner cloner) : base(original, cloner) { } 62 66 public SymbolicRegressionVariableFrequencyAnalyzer() 63 67 : base() { … … 66 70 Parameters.Add(new ValueLookupParameter<DataTable>(VariableFrequenciesParameterName, "The data table to store the variable frequencies.")); 67 71 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The result collection where the best symbolic regression solution should be stored.")); 72 } 73 74 public override IDeepCloneable Clone(Cloner cloner) { 75 return new SymbolicRegressionVariableFrequencyAnalyzer(this, cloner); 68 76 } 69 77 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs
r4468 r4722 135 135 private ResultsCollector resultsCollector; 136 136 137 [StorableConstructor] 138 private ValidationBestScaledSymbolicRegressionSolutionAnalyzer(bool deserializing) : base(deserializing) { } 139 private ValidationBestScaledSymbolicRegressionSolutionAnalyzer(ValidationBestScaledSymbolicRegressionSolutionAnalyzer original, Cloner cloner) 140 : base(original, cloner) { 141 Initialize(); 142 } 137 143 public ValidationBestScaledSymbolicRegressionSolutionAnalyzer() 138 144 : base() { … … 249 255 } 250 256 251 [StorableConstructor] 252 private ValidationBestScaledSymbolicRegressionSolutionAnalyzer(bool deserializing) : base() { } 257 public override IDeepCloneable Clone(Cloner cloner) { 258 return new ValidationBestScaledSymbolicRegressionSolutionAnalyzer(this, cloner); 259 } 253 260 254 261 [StorableHook(HookType.AfterDeserialization)] 262 private void AfterDeserialization() { 263 Initialize(); 264 } 255 265 private void Initialize() { 256 266 SymbolicExpressionTreeParameter.DepthChanged += new EventHandler(SymbolicExpressionTreeParameter_DepthChanged); 257 267 } 258 268 259 public override IDeepCloneable Clone(Cloner cloner) {260 ValidationBestScaledSymbolicRegressionSolutionAnalyzer clone = (ValidationBestScaledSymbolicRegressionSolutionAnalyzer)base.Clone(cloner);261 clone.Initialize();262 return clone;263 }264 269 265 270 private void SymbolicExpressionTreeParameter_DepthChanged(object sender, EventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.