Changeset 18099 for branches/3136_Structural_GP
- Timestamp:
- 12/01/21 10:43:00 (3 years ago)
- Location:
- branches/3136_Structural_GP
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs
r18095 r18099 206 206 counter: counter); 207 207 208 if (ConstantOptimizationRowsPercentage.Value != RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value) { 208 if (ConstantOptimizationRowsPercentage.Value != RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value) { //TODO: remove this? 209 209 var evaluationRows = GenerateRowsToEvaluate(); 210 210 quality = SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.Calculate( -
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/StructuredSymbolicRegressionSingleObjectiveProblem.cs
r18095 r18099 108 108 StructureTemplateDescriptionText, 109 109 structureTemplate)); 110 110 111 111 Parameters.Add(new ValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>( 112 112 InterpreterParameterName, 113 113 new SymbolicDataAnalysisExpressionTreeInterpreter()) { Hidden = true }); 114 114 115 115 Parameters.Add(new FixedValueParameter<DoubleLimit>( 116 116 EstimationLimitsParameterName, … … 120 120 121 121 this.EvaluatorParameter.Hidden = true; 122 122 123 123 Operators.Add(new SymbolicDataAnalysisVariableFrequencyAnalyzer()); 124 124 Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer()); 125 125 Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer()); 126 126 127 StructureTemplate.Template = 127 StructureTemplate.Template = 128 128 "(" + 129 129 "(210000 / (210000 + h)) * ((sigma_y * t * t) / (wR * Rt * t)) + " + … … 196 196 197 197 return TreeEvaluatorParameter.Value.Evaluate( 198 ProblemData, 199 tree, 198 ProblemData, 199 tree, 200 200 Interpreter, 201 201 ProblemData.TrainingIndices, 202 202 StructureTemplate.ApplyLinearScaling, 203 EstimationLimits.Lower, 203 EstimationLimits.Lower, 204 204 EstimationLimits.Upper); 205 205 } … … 275 275 } 276 276 277 public void Load(IRegressionProblemData data) => ProblemData = data; 277 public void Load(IRegressionProblemData data) { 278 ProblemData = data; 279 StructureTemplate.Template = "f(_)"; 280 } 278 281 } 279 282 } -
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/GraphicalSymbolicDataAnalysisModelView.cs
r17180 r18099 20 20 #endregion 21 21 22 using System.Drawing; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.MainForm; … … 40 41 protected override void OnContentChanged() { 41 42 base.OnContentChanged(); 42 symbolicExpressionTreeView.Content = null; 43 if (Content != null) 44 symbolicExpressionTreeView.Content = Content.SymbolicExpressionTree; 43 symbolicExpressionTreeChart.Tree = null; 44 if (Content != null) { 45 symbolicExpressionTreeChart.Tree = Content.SymbolicExpressionTree; 46 RepaintNodes(); 47 } 48 } 49 50 protected void RepaintNodes() { 51 var tree = symbolicExpressionTreeChart.Tree; 52 if (tree != null) { 53 foreach (var n in tree.IterateNodesPrefix()) { 54 if (n.Symbol is SubFunctionSymbol) { 55 var visualNode = symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(n); 56 visualNode.FillColor = Color.LightCyan; 57 visualNode.LineColor = Color.SlateGray; 58 } 59 } 60 symbolicExpressionTreeChart.RepaintNodes(); 61 } 45 62 } 46 63 } -
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/GraphicalSymbolicDataAnalysisModelView.designer.cs
r17180 r18099 19 19 */ 20 20 #endregion 21 22 using System.Drawing; 21 23 22 24 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views { … … 45 47 /// </summary> 46 48 private void InitializeComponent() { 47 this.symbolicExpressionTree View = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.GraphicalSymbolicExpressionTreeView();49 this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart(); 48 50 this.SuspendLayout(); 49 51 // 50 52 // expressionTreeView 51 53 // 52 this.symbolicExpressionTreeView.AllowDrop = true; 53 this.symbolicExpressionTreeView.Caption = "Graphical SymbolicExpressionTree View"; 54 this.symbolicExpressionTreeView.Content = null; 55 this.symbolicExpressionTreeView.Dock = System.Windows.Forms.DockStyle.Fill; 56 this.symbolicExpressionTreeView.Location = new System.Drawing.Point(0, 0); 57 this.symbolicExpressionTreeView.Name = "expressionTreeView"; 58 this.symbolicExpressionTreeView.ReadOnly = false; 59 this.symbolicExpressionTreeView.Size = new System.Drawing.Size(352, 413); 60 this.symbolicExpressionTreeView.TabIndex = 0; 54 this.symbolicExpressionTreeChart.AllowDrop = true; 55 this.symbolicExpressionTreeChart.Tree = null; 56 this.symbolicExpressionTreeChart.TextFont = new System.Drawing.Font(FontFamily.GenericSerif, 8F); 57 this.symbolicExpressionTreeChart.Dock = System.Windows.Forms.DockStyle.Fill; 58 this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(0, 0); 59 this.symbolicExpressionTreeChart.Name = "expressionTreeChart"; 60 this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(352, 413); 61 this.symbolicExpressionTreeChart.TabIndex = 0; 61 62 // 62 63 // SymbolicExpressionModelView … … 65 66 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 66 67 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 67 this.Controls.Add(this.symbolicExpressionTree View);68 this.Controls.Add(this.symbolicExpressionTreeChart); 68 69 this.Name = "SymbolicExpressionModelView"; 69 70 this.Size = new System.Drawing.Size(352, 413); … … 73 74 74 75 #endregion 75 private HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views. GraphicalSymbolicExpressionTreeView symbolicExpressionTreeView;76 private HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart symbolicExpressionTreeChart; 76 77 77 78 } -
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs
r18075 r18099 1 using System;1 using System; 2 2 using System.Collections.Generic; 3 3 using System.Drawing; … … 27 27 infoLabel.Text = ""; 28 28 this.Resize += StructureTemplateViewResize; 29 splitContainer.SplitterMoved += SplitContainerSplitterMoved; 29 30 treeChart.SymbolicExpressionTreeNodeClicked += SymbolicExpressionTreeNodeClicked; 30 31 32 } 33 34 private void SplitContainerSplitterMoved(object sender, EventArgs e) { 35 PaintTree(); 31 36 } 32 37 … … 48 53 if (Content == null) return; 49 54 expressionInput.Text = Content.Template; 50 linearScalingCheckBox.Checked = Content.ApplyLinearScaling; 55 linearScalingCheckBox.Checked = Content.ApplyLinearScaling; 51 56 PaintTree(); 52 57 infoLabel.Text = "";
Note: See TracChangeset
for help on using the changeset viewer.