Changeset 3926
- Timestamp:
- 06/17/10 14:43:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTree.cs
r3710 r3926 53 53 public int Size { 54 54 get { 55 if (root == null) 56 return 0; 55 57 return root.GetSize(); 56 58 } … … 59 61 public int Height { 60 62 get { 63 if (root == null) 64 return 0; 61 65 return root.GetHeight(); 62 66 } … … 73 77 74 78 public IEnumerable<SymbolicExpressionTreeNode> IterateNodesPrefix() { 79 if (root == null) 80 return new SymbolicExpressionTreeNode[0]; 75 81 return root.IterateNodesPrefix(); 76 82 } 77 83 public IEnumerable<SymbolicExpressionTreeNode> IterateNodesPostfix() { 84 if (root == null) 85 return new SymbolicExpressionTreeNode[0]; 78 86 return root.IterateNodesPostfix(); 79 87 } … … 82 90 SymbolicExpressionTree clone = new SymbolicExpressionTree(); 83 91 cloner.RegisterClonedObject(this, clone); 84 clone.root = (SymbolicExpressionTreeNode)this.root.Clone(); 92 if (root != null) 93 clone.root = (SymbolicExpressionTreeNode)this.root.Clone(); 85 94 return clone; 86 95 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs
r3806 r3926 117 117 118 118 [Storable] 119 private UniformSubScopesProcessor subScopesProcessor; 120 [Storable] 121 private SymbolicRegressionSolutionLinearScaler linearScaler; 122 [Storable] 123 private SymbolicRegressionModelQualityAnalyzer modelQualityAnalyzer; 124 [Storable] 125 private SymbolicRegressionMeanSquaredErrorEvaluator validationMseEvaluator; 126 [Storable] 119 127 private BestSymbolicRegressionSolutionAnalyzer bestSolutionAnalyzer; 120 128 [Storable] 121 private UniformSubScopesProcessor subScopesProcessor; 129 private UniformSubScopesProcessor cleaningSubScopesProcessor; 130 [Storable] 131 private Assigner removeScaledExpressionTreeAssigner; 132 [Storable] 133 private BestQualityMemorizer bestKnownQualityMemorizer; 122 134 [Storable] 123 135 private BestAverageWorstQualityCalculator bestAvgWorstValidationQualityCalculator; 124 136 [Storable] 125 private BestQualityMemorizer bestKnownQualityMemorizer;126 [Storable] 127 private SymbolicRegressionModelQualityAnalyzer modelQualityAnalyzer;137 private DataTableValuesCollector validationValuesCollector; 138 [Storable] 139 private ResultsCollector resultsCollector; 128 140 129 141 public ValidationBestScaledSymbolicRegressionSolutionAnalyzer() … … 148 160 #region operator initialization 149 161 subScopesProcessor = new UniformSubScopesProcessor(); 150 SymbolicRegressionSolutionLinearScalerlinearScaler = new SymbolicRegressionSolutionLinearScaler();162 linearScaler = new SymbolicRegressionSolutionLinearScaler(); 151 163 modelQualityAnalyzer = new SymbolicRegressionModelQualityAnalyzer(); 152 SymbolicRegressionMeanSquaredErrorEvaluatorvalidationMseEvaluator = new SymbolicRegressionMeanSquaredErrorEvaluator();164 validationMseEvaluator = new SymbolicRegressionMeanSquaredErrorEvaluator(); 153 165 bestSolutionAnalyzer = new BestSymbolicRegressionSolutionAnalyzer(); 166 cleaningSubScopesProcessor = new UniformSubScopesProcessor(); 167 removeScaledExpressionTreeAssigner = new Assigner(); 154 168 bestKnownQualityMemorizer = new BestQualityMemorizer(); 155 169 bestAvgWorstValidationQualityCalculator = new BestAverageWorstQualityCalculator(); 156 DataTableValuesCollectorvalidationValuesCollector = new DataTableValuesCollector();157 ResultsCollectorresultsCollector = new ResultsCollector();170 validationValuesCollector = new DataTableValuesCollector(); 171 resultsCollector = new ResultsCollector(); 158 172 #endregion 159 173 … … 197 211 bestSolutionAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name; 198 212 213 cleaningSubScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth; 214 215 removeScaledExpressionTreeAssigner.LeftSideParameter.ActualName = ScaledSymbolicExpressionTreeParameterName; 216 removeScaledExpressionTreeAssigner.RightSideParameter.Value = new SymbolicExpressionTree(); 217 199 218 bestAvgWorstValidationQualityCalculator.AverageQualityParameter.ActualName = "Current average validation quality"; 200 219 bestAvgWorstValidationQualityCalculator.BestQualityParameter.ActualName = CurrentBestValidationQualityParameterName; … … 226 245 subScopesProcessor.Successor = modelQualityAnalyzer; 227 246 modelQualityAnalyzer.Successor = bestSolutionAnalyzer; 228 bestSolutionAnalyzer.Successor = bestAvgWorstValidationQualityCalculator; 247 bestSolutionAnalyzer.Successor = cleaningSubScopesProcessor; 248 cleaningSubScopesProcessor.Operator = removeScaledExpressionTreeAssigner; 249 cleaningSubScopesProcessor.Successor = bestAvgWorstValidationQualityCalculator; 229 250 bestAvgWorstValidationQualityCalculator.Successor = bestKnownQualityMemorizer; 230 251 bestKnownQualityMemorizer.Successor = validationValuesCollector; … … 252 273 private void SymbolicExpressionTreeParameter_DepthChanged(object sender, EventArgs e) { 253 274 subScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth; 275 cleaningSubScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth; 254 276 bestSolutionAnalyzer.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth; 255 277 bestSolutionAnalyzer.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth;
Note: See TracChangeset
for help on using the changeset viewer.