Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3710


Ignore:
Timestamp:
05/07/10 21:10:46 (14 years ago)
Author:
gkronber
Message:

Implemented reviewer comments. #893 (HeuristicLab 3.3.0 application review)

Location:
trunk/sources
Files:
1 added
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/DataTable.cs

    r3431 r3710  
    3333  public sealed class DataTable : NamedItem {
    3434    public override Image ItemImage {
    35       get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Table; }
     35      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Performance.ToBitmap(); }
    3636    }
    3737
  • trunk/sources/HeuristicLab.Analysis/3.3/MinAverageMaxValueAnalyzer.cs

    r3662 r3710  
    5656      get { return (ValueLookupParameter<VariableCollection>)Parameters["Results"]; }
    5757    }
     58    public ValueParameter<BoolValue> CollectMinValueInResultsParameter {
     59      get { return (ValueParameter<BoolValue>)Parameters["CollectMinValueInResults"]; }
     60    }
     61    public ValueParameter<BoolValue> CollectMaxValueInResultsParameter {
     62      get { return (ValueParameter<BoolValue>)Parameters["CollectMaxValueInResults"]; }
     63    }
     64    public ValueParameter<BoolValue> CollectAverageValueInResultsParameter {
     65      get { return (ValueParameter<BoolValue>)Parameters["CollectAverageValueInResults"]; }
     66    }
    5867    #endregion
    5968
     
    6271      get { return (MinAverageMaxValueCalculator)OperatorGraph.InitialOperator; }
    6372    }
     73    private BoolValue CollectMinValueInResults {
     74      get { return CollectMinValueInResultsParameter.Value; }
     75    }
     76    private BoolValue CollectMaxValueInResults {
     77      get { return CollectMaxValueInResultsParameter.Value; }
     78    }
     79    private BoolValue CollectAverageValueInResults {
     80      get { return CollectAverageValueInResultsParameter.Value; }
     81    }
    6482    #endregion
    65 
     83    [Storable]
     84    private ResultsCollector resultsCollector;
    6685    public MinAverageMaxValueAnalyzer()
    6786      : base() {
     
    6988      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", "The value contained in the scope tree which should be analyzed."));
    7089      Parameters.Add(new ValueLookupParameter<DoubleValue>("MinValue", "The minimum of the value."));
     90      Parameters.Add(new ValueParameter<BoolValue>("CollectMinValueInResults", "Determines if the minimum of the value should also be stored in the results.", new BoolValue(true)));
    7191      Parameters.Add(new ValueLookupParameter<DoubleValue>("AverageValue", "The average of the value."));
     92      Parameters.Add(new ValueParameter<BoolValue>("CollectAverageValueInResults", "Determines if the average of the value should also be stored in the results.", new BoolValue(true)));
    7293      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaxValue", "The maximum of the value."));
     94      Parameters.Add(new ValueParameter<BoolValue>("CollectMaxValueInResults", "Determines if the maximum of the value should also be stored in the results.", new BoolValue(true)));
    7395      Parameters.Add(new ValueLookupParameter<DataTable>("Values", "The data table to store the minimum, average and maximum of the value."));
    7496      Parameters.Add(new ValueLookupParameter<VariableCollection>("Results", "The results collection where the analysis values should be stored."));
     
    78100      MinAverageMaxValueCalculator minAverageMaxValueCalculator = new MinAverageMaxValueCalculator();
    79101      DataTableValuesCollector dataTableValuesCollector = new DataTableValuesCollector();
    80       ResultsCollector resultsCollector = new ResultsCollector();
     102      resultsCollector = new ResultsCollector();
    81103
    82104      minAverageMaxValueCalculator.AverageValueParameter.ActualName = AverageValueParameter.Name;
     
    91113      dataTableValuesCollector.DataTableParameter.ActualName = ValuesParameter.Name;
    92114
    93       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MinValue", null, MinValueParameter.Name));
    94       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("AverageValue", null, AverageValueParameter.Name));
    95       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MaxValue", null, MaxValueParameter.Name));
     115      if (CollectMinValueInResults.Value)
     116        resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MinValue", null, MinValueParameter.Name));
     117      if (CollectAverageValueInResults.Value)
     118        resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("AverageValue", null, AverageValueParameter.Name));
     119      if (CollectMaxValueInResults.Value)
     120        resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MaxValue", null, MaxValueParameter.Name));
    96121      resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>(ValuesParameter.Name));
    97122      resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
     
    113138    private void Initialize() {
    114139      ValueParameter.DepthChanged += new EventHandler(ValueParameter_DepthChanged);
     140      CollectMinValueInResultsParameter.ValueChanged += new EventHandler(CollectMinValueInResultsParameter_ValueChanged);
     141      CollectMinValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectMinValueInResultsParameter_ValueChanged);
     142      CollectMaxValueInResultsParameter.ValueChanged += new EventHandler(CollectMaxValueInResultsParameter_ValueChanged);
     143      CollectMaxValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectMaxValueInResultsParameter_ValueChanged);
     144      CollectAverageValueInResultsParameter.ValueChanged += new EventHandler(CollectAverageValueInResultsParameter_ValueChanged);
     145      CollectAverageValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectAverageValueInResultsParameter_ValueChanged);
     146    }
     147
     148    private void CollectAverageValueInResultsParameter_ValueChanged(object sender, EventArgs e) {
     149      if (CollectAverageValueInResults.Value)
     150        resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("AverageValue", null, AverageValueParameter.Name));
     151      else {
     152        IParameter avgValueParameter;
     153        resultsCollector.CollectedValues.TryGetValue("AverageValue", out avgValueParameter);
     154        resultsCollector.CollectedValues.Remove(avgValueParameter);
     155      }
     156    }
     157
     158    private void CollectMaxValueInResultsParameter_ValueChanged(object sender, EventArgs e) {
     159      if (CollectMaxValueInResults.Value)
     160        resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MaxValue", null, MaxValueParameter.Name));
     161      else {
     162        IParameter maxValueParameter;
     163        resultsCollector.CollectedValues.TryGetValue("MaxValue", out maxValueParameter);
     164        resultsCollector.CollectedValues.Remove(maxValueParameter);
     165      }
     166    }
     167
     168    private void CollectMinValueInResultsParameter_ValueChanged(object sender, EventArgs e) {
     169      if (CollectMinValueInResults.Value)
     170        resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MinValue", null, MinValueParameter.Name));
     171      else {
     172        IParameter minValueParameter;
     173        resultsCollector.CollectedValues.TryGetValue("MinValue", out minValueParameter);
     174        resultsCollector.CollectedValues.Remove(minValueParameter);
     175      }
    115176    }
    116177
  • trunk/sources/HeuristicLab.Common.Resources/3.3/HeuristicLab.Common.Resources-3.3.csproj

    r3702 r3710  
    429429  <ItemGroup>
    430430    <Content Include="Resources\VS2008ImageLibrary\VS2008ImageLibrary_Actions_ActualSize.png" />
     431    <Content Include="Resources\VS2008ImageLibrary\VS2008ImageLibrary_Objects_Performance.ico" />
    431432  </ItemGroup>
    432433  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • trunk/sources/HeuristicLab.Common.Resources/3.3/VS2008ImageLibrary.Designer.cs

    r3511 r3710  
    509509        }
    510510       
     511        public static System.Drawing.Icon Performance {
     512            get {
     513                object obj = ResourceManager.GetObject("Performance", resourceCulture);
     514                return ((System.Drawing.Icon)(obj));
     515            }
     516        }
     517       
    511518        public static System.Drawing.Bitmap Play {
    512519            get {
  • trunk/sources/HeuristicLab.Common.Resources/3.3/VS2008ImageLibrary.resx

    r3511 r3710  
    311311    <value>Resources\VS2008ImageLibrary\VS2008ImageLibrary_Actions_Pause.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    312312  </data>
     313  <data name="Performance" type="System.Resources.ResXFileRef, System.Windows.Forms">
     314    <value>Resources\VS2008ImageLibrary\VS2008ImageLibrary_Objects_Performance.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
     315  </data>
    313316  <data name="Play" type="System.Resources.ResXFileRef, System.Windows.Forms">
    314317    <value>Resources\VS2008ImageLibrary\VS2008ImageLibrary_Actions_Play.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/MinAvgMaxSymbolicExpressionTreeSizeAnalyzer.cs

    r3683 r3710  
    3333using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
    3434using System;
     35using HeuristicLab.Optimization.Operators;
    3536
    3637namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers {
     
    4344    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
    4445    private const string SymbolicExpressionTreeSizeParameterName = "SymbolicExpressionTreeSize";
    45     private const string SymbolicExpressionTreeSizesParameterName = "SymbolicExpressionTreeSizes";
     46    private const string SymbolicExpressionTreeSizesParameterName = "Symbolic expression tree size";
     47    private const string MinTreeSizeParameterName = "Min tree size";
     48    private const string AverageTreeSizeParameterName = "Average tree size";
     49    private const string MaxTreeSizeParameterName = "Max tree size";
    4650    private const string ResultsParameterName = "Results";
    4751
     
    5963      get { return (ValueLookupParameter<VariableCollection>)Parameters[ResultsParameterName]; }
    6064    }
    61    
     65
    6266    [Storable]
    6367    private MinAverageMaxValueAnalyzer valueAnalyzer;
    6468    [Storable]
    65     private SymbolicExpressionTreeSizeCalculator sizeCalculator;
     69    private UniformSubScopesProcessor subScopesProcessor;
    6670
    6771    #endregion
     
    7377      Parameters.Add(new ValueLookupParameter<VariableCollection>(ResultsParameterName, "The results collection where the analysis values should be stored."));
    7478
    75       sizeCalculator = new SymbolicExpressionTreeSizeCalculator();
     79      subScopesProcessor = new UniformSubScopesProcessor();
     80      SymbolicExpressionTreeSizeCalculator sizeCalculator = new SymbolicExpressionTreeSizeCalculator();
    7681      valueAnalyzer = new MinAverageMaxValueAnalyzer();
     82
     83      subScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth;
    7784      sizeCalculator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
    78       sizeCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    7985      sizeCalculator.SymbolicExpressionTreeSizeParameter.ActualName = SymbolicExpressionTreeSizeParameter.Name;
    80       sizeCalculator.SymbolicExpressionTreeSizeParameter.Depth = SymbolicExpressionTreeSizeParameter.Depth;
    8186      valueAnalyzer.ValueParameter.ActualName = sizeCalculator.SymbolicExpressionTreeSizeParameter.Name;
    8287      valueAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeSizeParameter.Depth;
     88      valueAnalyzer.AverageValueParameter.ActualName = AverageTreeSizeParameterName;
     89      valueAnalyzer.CollectAverageValueInResultsParameter.Value = new BoolValue(false);
     90      valueAnalyzer.MaxValueParameter.ActualName = MaxTreeSizeParameterName;
     91      valueAnalyzer.CollectMaxValueInResultsParameter.Value = new BoolValue(false);
     92      valueAnalyzer.MinValueParameter.ActualName = MinTreeSizeParameterName;
     93      valueAnalyzer.CollectMinValueInResultsParameter.Value = new BoolValue(false);
    8394      valueAnalyzer.ValuesParameter.ActualName = SymbolicExpressionTreeSizesParameter.Name;
    84       valueAnalyzer.ResultsParameter.ActualName = ResultsParameter.Name;
    85       valueAnalyzer.AverageValueParameter.ActualName = "Avg. Tree Size";
    86       valueAnalyzer.MaxValueParameter.ActualName = "Max Tree Size";
    87       valueAnalyzer.MinValueParameter.ActualName = "Min Tree Size";
    8895
    89       OperatorGraph.InitialOperator = sizeCalculator;
    90       sizeCalculator.Successor = valueAnalyzer;
     96      OperatorGraph.InitialOperator = subScopesProcessor;
     97      subScopesProcessor.Operator = sizeCalculator;
     98      sizeCalculator.Successor = null;
     99      subScopesProcessor.Successor = valueAnalyzer;
    91100      valueAnalyzer.Successor = null;
    92101
     
    119128    private void OnDepthParameterChanged() {
    120129      valueAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    121       sizeCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    122       sizeCalculator.SymbolicExpressionTreeSizeParameter.Depth = SymbolicExpressionTreeSizeParameter.Depth;
     130      subScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth;
    123131    }
    124132  }
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeCalculator.cs

    r3683 r3710  
    4242
    4343    #region parameter properties
    44     public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
    45       get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     44    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
     45      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
    4646    }
    47     public ScopeTreeLookupParameter<DoubleValue> SymbolicExpressionTreeSizeParameter {
    48       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters[SymbolicExpressionTreeSizeParameterName]; }
     47    public ILookupParameter<DoubleValue> SymbolicExpressionTreeSizeParameter {
     48      get { return (ILookupParameter<DoubleValue>)Parameters[SymbolicExpressionTreeSizeParameterName]; }
    4949    }
    5050    #endregion
    5151
    5252    #region properties
    53     public ItemArray<SymbolicExpressionTree> SymbolicExpressionTree {
     53    public SymbolicExpressionTree SymbolicExpressionTree {
    5454      get { return SymbolicExpressionTreeParameter.ActualValue; }
    5555    }
    56     public ItemArray<DoubleValue> SymbolicExpressionTreeSize {
     56    public DoubleValue SymbolicExpressionTreeSize {
    5757      get { return SymbolicExpressionTreeSizeParameter.ActualValue; }
    5858      set { SymbolicExpressionTreeSizeParameter.ActualValue = value; }
     
    6262    public SymbolicExpressionTreeSizeCalculator()
    6363      : base() {
    64       Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose size should be calculated."));
    65       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(SymbolicExpressionTreeSizeParameterName, "The tree size of the symbolic expression tree."));
     64      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose size should be calculated."));
     65      Parameters.Add(new LookupParameter<DoubleValue>(SymbolicExpressionTreeSizeParameterName, "The tree size of the symbolic expression tree."));
    6666    }
    6767
    6868    public override IOperation Apply() {
    69       ItemArray<SymbolicExpressionTree> trees = SymbolicExpressionTree;
    70       SymbolicExpressionTreeSize = new ItemArray<DoubleValue>(from tree in trees
    71                                                               select new DoubleValue(tree.Size));
     69      SymbolicExpressionTree tree = SymbolicExpressionTree;
     70      SymbolicExpressionTreeSize = new DoubleValue(tree.Size);
    7271      return base.Apply();
    7372    }
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj

    r3681 r3710  
    150150      <Name>HeuristicLab.Collections-3.3</Name>
    151151    </ProjectReference>
     152    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
     153      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
     154      <Name>HeuristicLab.Common.Resources-3.3</Name>
     155    </ProjectReference>
    152156    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    153157      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
     
    165169      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
    166170      <Name>HeuristicLab.Operators-3.3</Name>
     171    </ProjectReference>
     172    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
     173      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
     174      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
    167175    </ProjectReference>
    168176    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin.cs.frame

    r3651 r3710  
    3131  [PluginDependency("HeuristicLab.Collections", "3.3.0.0")]
    3232  [PluginDependency("HeuristicLab.Common", "3.3.0.0")]
     33  [PluginDependency("HeuristicLab.Common.Resources", "3.3.0.0")]
    3334  [PluginDependency("HeuristicLab.Core", "3.3.0.0")]
    3435  [PluginDependency("HeuristicLab.Data", "3.3.0.0")]
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTree.cs

    r3442 r3710  
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030using HeuristicLab.Data;
     31using System.Drawing;
    3132
    3233namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
     
    3435  [Item("SymbolicExpressionTree", "Represents a symbolic expression tree.")]
    3536  public class SymbolicExpressionTree : Item {
     37    public override Image ItemImage {
     38      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Function; }
     39    }
    3640    [Storable]
    3741    private SymbolicExpressionTreeNode root;
  • trunk/sources/HeuristicLab.Operators/3.3/SubScopesProcessor.cs

    r3407 r3710  
    2020#endregion
    2121
     22using System.Linq;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2526using HeuristicLab.Parameters;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using System.Collections.Generic;
     29using System;
    2730
    2831namespace HeuristicLab.Operators {
    2932  /// <summary>
    30   /// An operator which contains multiple operators of which each is applied on one sub-scope of the current scope. The first operator is applied on the first sub-scope, the second on the second, and so on.
     33  /// An operator which contains multiple operators of which each is applied on one sub-scope at the given depth of the current scope. The first operator is applied on the first sub-scope, the second on the second, and so on.
    3134  /// </summary>
    32   [Item("SubScopesProcessor", "An operator which contains multiple operators of which each is applied on one sub-scope of the current scope. The first operator is applied on the first sub-scope, the second on the second, and so on.")]
     35  [Item("SubScopesProcessor", "An operator which contains multiple operators of which each is applied on one sub-scope at the given depth of the current scope. The first operator is applied on the first sub-scope, the second on the second, and so on.")]
    3336  [StorableClass]
    3437  public sealed class SubScopesProcessor : MultiOperator<IOperator> {
    3538    public ValueLookupParameter<BoolValue> ParallelParameter {
    3639      get { return (ValueLookupParameter<BoolValue>)Parameters["Parallel"]; }
     40    }
     41    public ValueParameter<IntValue> DepthParameter {
     42      get { return (ValueParameter<IntValue>)Parameters["Depth"]; }
    3743    }
    3844
     
    4147      set { ParallelParameter.Value = value; }
    4248    }
     49    public IntValue Depth {
     50      get { return DepthParameter.Value; }
     51      set { DepthParameter.Value = value; }
     52    }
    4353
    4454    public SubScopesProcessor()
    4555      : base() {
    4656      Parameters.Add(new ValueLookupParameter<BoolValue>("Parallel", "True if the operators should be applied in parallel on the sub-scopes, otherwise false.", new BoolValue(false)));
     57      Parameters.Add(new ValueParameter<IntValue>("Depth", "The number of steps to descend in the scope tree before applying operator.", new IntValue(1)));
    4758    }
    4859
    4960    public override IOperation Apply() {
    50       BoolValue parallel = ParallelParameter.ActualValue;
     61      List<IScope> scopes = GetScopesOnLevel(ExecutionContext.Scope, Depth.Value).ToList();
    5162      OperationCollection next = new OperationCollection(base.Apply());
    52       if (Operators.Count > 0) {
    53         OperationCollection inner = new OperationCollection();
    54         inner.Parallel = parallel == null ? false : parallel.Value;
    55         for (int i = 0; (i < ExecutionContext.Scope.SubScopes.Count) && (i < Operators.Count); i++)
    56           if (Operators[i] != null) inner.Add(ExecutionContext.CreateOperation(Operators[i], ExecutionContext.Scope.SubScopes[i]));
    57         next.Insert(0, inner);
     63      if (scopes.Count != Operators.Count)
     64        throw new ArgumentException("The number of operators doesn't match the number of sub-scopes at depth " + Depth.Value);
     65      OperationCollection inner = new OperationCollection();
     66      inner.Parallel = Parallel == null ? false : Parallel.Value;
     67      for (int i = 0; i < scopes.Count(); i++) {
     68        inner.Add(ExecutionContext.CreateOperation(Operators[i], scopes[i]));
    5869      }
     70      next.Insert(0, inner);
    5971      return next;
     72    }
     73
     74    private IEnumerable<IScope> GetScopesOnLevel(IScope scope, int d) {
     75      if (d == 0) yield return scope;
     76      else {
     77        foreach (IScope subScope in scope.SubScopes) {
     78          foreach (IScope scopesOfSubScope in GetScopesOnLevel(subScope, d - 1)) {
     79            yield return scopesOfSubScope;
     80          }
     81        }
     82      }
    6083    }
    6184  }
  • trunk/sources/HeuristicLab.Operators/3.3/UniformSubScopesProcessor.cs

    r3376 r3710  
    2525using HeuristicLab.Parameters;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using System.Collections.Generic;
     28using System;
     29using System.Linq;
    2730
    2831namespace HeuristicLab.Operators {
    2932  /// <summary>
    30   /// An operator which applies a specified operator on all sub-scopes of the current scope.
     33  /// An operator which applies a specified operator on all sub-scopes at the given depth of the current scope.
    3134  /// </summary>
    32   [Item("UniformSubScopesProcessor", "An operator which applies a specified operator on all sub-scopes of the current scope.")]
     35  [Item("UniformSubScopesProcessor", "An operator which applies a specified operator on all sub-scopes at the given depth of the current scope.")]
    3336  [StorableClass]
    3437  public sealed class UniformSubScopesProcessor : SingleSuccessorOperator {
     
    3841    public ValueLookupParameter<BoolValue> ParallelParameter {
    3942      get { return (ValueLookupParameter<BoolValue>)Parameters["Parallel"]; }
     43    }
     44    public ValueParameter<IntValue> DepthParameter {
     45      get { return (ValueParameter<IntValue>)Parameters["Depth"]; }
    4046    }
    4147
     
    4854      set { ParallelParameter.Value = value; }
    4955    }
     56    public IntValue Depth {
     57      get { return DepthParameter.Value; }
     58      set { DepthParameter.Value = value; }
     59    }
    5060
    5161    public UniformSubScopesProcessor()
     
    5363      Parameters.Add(new OperatorParameter("Operator", "The operator which should be applied on all sub-scopes of the current scope."));
    5464      Parameters.Add(new ValueLookupParameter<BoolValue>("Parallel", "True if the operator should be applied in parallel on all sub-scopes, otherwise false.", new BoolValue(false)));
     65      Parameters.Add(new ValueParameter<IntValue>("Depth", "The number of steps to descend in the scope tree before applying operator.", new IntValue(1)));
    5566    }
    5667
    5768    public override IOperation Apply() {
    58       BoolValue parallel = ParallelParameter.ActualValue;
    5969      OperationCollection next = new OperationCollection(base.Apply());
    6070      if (Operator != null) {
     71        List<IScope> scopes = GetScopesOnLevel(ExecutionContext.Scope, Depth.Value).ToList();
    6172        OperationCollection inner = new OperationCollection();
    62         inner.Parallel = parallel == null ? false : parallel.Value;
    63         for (int i = 0; i < ExecutionContext.Scope.SubScopes.Count; i++)
    64           inner.Add(ExecutionContext.CreateOperation(Operator, ExecutionContext.Scope.SubScopes[i]));
     73        inner.Parallel = Parallel == null ? false : Parallel.Value;
     74        for (int i = 0; i < scopes.Count; i++) {
     75          inner.Add(ExecutionContext.CreateOperation(Operator, scopes[i]));
     76        }
    6577        next.Insert(0, inner);
    6678      }
    6779      return next;
    6880    }
     81
     82    private IEnumerable<IScope> GetScopesOnLevel(IScope scope, int d) {
     83      if (d == 0) yield return scope;
     84      else {
     85        foreach (IScope subScope in scope.SubScopes) {
     86          foreach (IScope scopesOfSubScope in GetScopesOnLevel(subScope, d - 1)) {
     87            yield return scopesOfSubScope;
     88          }
     89        }
     90      }
     91    }
    6992  }
    7093}
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/UploadPluginsView.cs

    r3627 r3710  
    118118      var selectedPlugins = (IEnumerable<IPluginDescription>)e.Argument;
    119119      DeploymentService.AdminClient adminClient = DeploymentService.AdminClientFactory.CreateClient();
     120      Dictionary<IPluginDescription, DeploymentService.PluginDescription> cachedPluginDescriptions =
     121        new Dictionary<IPluginDescription, DeploymentService.PluginDescription>();
    120122      try {
    121123        foreach (var plugin in IteratePlugins(selectedPlugins)) {
    122           adminClient.DeployPlugin(MakePluginDescription(plugin), CreateZipPackage(plugin));
     124          adminClient.DeployPlugin(MakePluginDescription(plugin, cachedPluginDescriptions), CreateZipPackage(plugin));
    123125        }
    124126        adminClient.Close();
     
    227229        var matchingLocalPlugin = (from localPlugin in localAndServerPlugins.Keys
    228230                                   where localPlugin.Name == plugin.Name
    229                                    where localPlugin.Version == localPlugin.Version
     231                                   where localPlugin.Version == plugin.Version
    230232                                   select localPlugin).SingleOrDefault();
    231233        if (matchingLocalPlugin != null) {
     
    296298    }
    297299
    298     private DeploymentService.PluginDescription MakePluginDescription(IPluginDescription plugin) {
    299       var dependencies = from dep in plugin.Dependencies
    300                          select MakePluginDescription(dep);
    301       return new DeploymentService.PluginDescription(plugin.Name, plugin.Version, dependencies, plugin.ContactName, plugin.ContactEmail, plugin.LicenseText);
     300    private DeploymentService.PluginDescription MakePluginDescription(IPluginDescription plugin, Dictionary<IPluginDescription, DeploymentService.PluginDescription> cachedPluginDescriptions) {
     301      if (!cachedPluginDescriptions.ContainsKey(plugin)) {
     302        var dependencies = (from dep in plugin.Dependencies
     303                            select MakePluginDescription(dep, cachedPluginDescriptions))
     304                           .ToList();
     305        cachedPluginDescriptions.Add(plugin,
     306          new DeploymentService.PluginDescription(plugin.Name, plugin.Version, dependencies, plugin.ContactName, plugin.ContactEmail, plugin.LicenseText));
     307      }
     308      return cachedPluginDescriptions[plugin];
    302309    }
    303310    #endregion
  • trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrail.cs

    r3431 r3710  
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     28using System.Drawing;
    2829
    2930namespace HeuristicLab.Problems.ArtificialAnt {
     
    3435  [StorableClass]
    3536  public sealed class AntTrail : Item {
     37    public override Image ItemImage {
     38      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Image; }
     39    }
    3640    [Storable]
    3741    private SymbolicExpressionTree expression;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj

    r3702 r3710  
    8787    <Compile Include="Properties\AssemblyInfo.cs" />
    8888    <Compile Include="Symbolic\Analyzers\BestSymbolicRegressionSolutionAnalyzer.cs" />
    89     <Compile Include="Symbolic\Analyzers\SymbolicRegressionMeanSquaredErrorCalculator.cs" />
    9089    <Compile Include="Symbolic\Analyzers\ISymbolicRegressionAnalyzer.cs" />
    9190    <Compile Include="Symbolic\Analyzers\SymbolicRegressionModelQualityAnalyzer.cs" />
    92     <Compile Include="Symbolic\Analyzers\SymbolicRegressionModelQualityCalculator.cs" />
     91    <Compile Include="Symbolic\Analyzers\SymbolicRegressionModelQualityCalculator.cs">
     92      <SubType>Code</SubType>
     93    </Compile>
    9394    <Compile Include="Symbolic\Analyzers\SymbolicRegressionSolutionLinearScaler.cs" />
    9495    <Compile Include="Symbolic\Analyzers\SymbolicRegressionVariableFrequencyAnalyzer.cs" />
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/BestSymbolicRegressionSolutionAnalyzer.cs

    r3681 r3710  
    3434using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
    3535using HeuristicLab.Problems.DataAnalysis;
     36using HeuristicLab.Problems.DataAnalysis.Evaluators;
    3637
    3738namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
     
    4849    private const string BestSolutionQualityParameterName = "BestSolutionQuality";
    4950    private const string ResultsParameterName = "Results";
    50 
    51     private const string BestSolutionResultName = "Best Solution (on validiation set)";
    52     private const string BestSolutionInputvariableCountResultName = "Variables Used by Best Solution";
     51    private const string BestSolutionResultName = "Best solution (on validiation set)";
     52    private const string BestSolutionInputvariableCountResultName = "Variables used by best solution";
     53    private const string BestSolutionTrainingRSquared = "Best solution R² (training)";
     54    private const string BestSolutionTestRSquared = "Best solution R² (test)";
     55    private const string BestSolutionTrainingMse = "Best solution mean squared error (training)";
     56    private const string BestSolutionTestMse = "Best solution mean squared error (test)";
     57    private const string BestSolutionTrainingRelativeError = "Best solution average relative error (training)";
     58    private const string BestSolutionTestRelativeError = "Best solution average relative error (test)";
    5359
    5460    public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
     
    112118        results.Add(new Result(BestSolutionResultName, solution));
    113119        results.Add(new Result(BestSolutionInputvariableCountResultName, new IntValue(model.InputVariables.Count())));
     120        #region calculate R2,MSE,Rel Error
     121        double[] trainingValues = problemData.Dataset.GetVariableValues(
     122          problemData.TargetVariable.Value,
     123          problemData.TrainingSamplesStart.Value,
     124          problemData.TrainingSamplesEnd.Value);
     125        double[] testValues = problemData.Dataset.GetVariableValues(
     126          problemData.TargetVariable.Value,
     127          problemData.TestSamplesStart.Value,
     128          problemData.TestSamplesEnd.Value);
     129        double trainingR2 = SimpleRSquaredEvaluator.Calculate(trainingValues, solution.EstimatedTrainingValues);
     130        double testR2 = SimpleRSquaredEvaluator.Calculate(testValues, solution.EstimatedTestValues);
     131        double trainingMse = SimpleMSEEvaluator.Calculate(trainingValues, solution.EstimatedTrainingValues);
     132        double testMse = SimpleMSEEvaluator.Calculate(testValues, solution.EstimatedTestValues);
     133        double trainingRelError = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate(trainingValues, solution.EstimatedTrainingValues);
     134        double testRelError = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate(testValues, solution.EstimatedTestValues);
     135        results.Add(new Result(BestSolutionTrainingRSquared, new DoubleValue(trainingR2)));
     136        results.Add(new Result(BestSolutionTestRSquared, new DoubleValue(testR2)));
     137        results.Add(new Result(BestSolutionTrainingMse, new DoubleValue(trainingMse)));
     138        results.Add(new Result(BestSolutionTestMse, new DoubleValue(testMse)));
     139        results.Add(new Result(BestSolutionTrainingRelativeError, new DoubleValue(trainingRelError)));
     140        results.Add(new Result(BestSolutionTestRelativeError, new DoubleValue(testRelError)));
     141        #endregion
    114142      } else {
    115143        if (BestSolutionQualityParameter.ActualValue.Value > qualities[i].Value) {
     
    120148          results[BestSolutionResultName].Value = solution;
    121149          results[BestSolutionInputvariableCountResultName].Value = new IntValue(model.InputVariables.Count());
     150          #region update R2,MSE, Rel Error
     151          double[] trainingValues = problemData.Dataset.GetVariableValues(
     152            problemData.TargetVariable.Value,
     153            problemData.TrainingSamplesStart.Value,
     154            problemData.TrainingSamplesEnd.Value);
     155          double[] testValues = problemData.Dataset.GetVariableValues(
     156            problemData.TargetVariable.Value,
     157            problemData.TestSamplesStart.Value,
     158            problemData.TestSamplesEnd.Value);
     159          double trainingR2 = SimpleRSquaredEvaluator.Calculate(trainingValues, solution.EstimatedTrainingValues);
     160          double testR2 = SimpleRSquaredEvaluator.Calculate(testValues, solution.EstimatedTestValues);
     161          double trainingMse = SimpleMSEEvaluator.Calculate(trainingValues, solution.EstimatedTrainingValues);
     162          double testMse = SimpleMSEEvaluator.Calculate(testValues, solution.EstimatedTestValues);
     163          double trainingRelError = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate(trainingValues, solution.EstimatedTrainingValues);
     164          double testRelError = SimpleMeanAbsolutePercentageErrorEvaluator.Calculate(testValues, solution.EstimatedTestValues);
     165          results[BestSolutionTrainingRSquared].Value = new DoubleValue(trainingR2);
     166          results[BestSolutionTestRSquared].Value = new DoubleValue(testR2);
     167          results[BestSolutionTrainingMse].Value = new DoubleValue(trainingMse);
     168          results[BestSolutionTestMse].Value = new DoubleValue(testMse);
     169          results[BestSolutionTrainingRelativeError].Value = new DoubleValue(trainingRelError);
     170          results[BestSolutionTestRelativeError].Value = new DoubleValue(testRelError);
     171          #endregion
    122172        }
    123173      }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs

    r3683 r3710  
    5151    private const string ResultsParameterName = "Results";
    5252
    53     private const string TrainingMeanSquaredErrorQualityParameterName = "TrainingMeanSquaredError";
    54     private const string MinTrainingMeanSquaredErrorQualityParameterName = "MinTrainingMeanSquaredError";
    55     private const string MaxTrainingMeanSquaredErrorQualityParameterName = "MaxTrainingMeanSquaredError";
    56     private const string AverageTrainingMeanSquaredErrorQualityParameterName = "AverageTrainingMeanSquaredError";
    57     private const string BestTrainingMeanSquaredErrorQualityParameterName = "BestTrainingMeanSquaredError";
    58 
    59     private const string TrainingAverageRelativeErrorQualityParameterName = "TrainingAverageRelativeError";
    60     private const string MinTrainingAverageRelativeErrorQualityParameterName = "MinTrainingAverageRelativeError";
    61     private const string MaxTrainingAverageRelativeErrorQualityParameterName = "MaxTrainingAverageRelativeError";
    62     private const string AverageTrainingAverageRelativeErrorQualityParameterName = "AverageTrainingAverageRelativeError";
    63     private const string BestTrainingAverageRelativeErrorQualityParameterName = "BestTrainingAverageRelativeError";
    64 
    65     private const string TrainingRSquaredQualityParameterName = "TrainingRSquared";
    66     private const string MinTrainingRSquaredQualityParameterName = "MinTrainingRSquared";
    67     private const string MaxTrainingRSquaredQualityParameterName = "MaxTrainingRSquared";
    68     private const string AverageTrainingRSquaredQualityParameterName = "AverageTrainingRSquared";
    69     private const string BestTrainingRSquaredQualityParameterName = "BestTrainingRSquared";
    70 
    71     private const string TestMeanSquaredErrorQualityParameterName = "TestMeanSquaredError";
    72     private const string MinTestMeanSquaredErrorQualityParameterName = "MinTestMeanSquaredError";
    73     private const string MaxTestMeanSquaredErrorQualityParameterName = "MaxTestMeanSquaredError";
    74     private const string AverageTestMeanSquaredErrorQualityParameterName = "AverageTestMeanSquaredError";
    75     private const string BestTestMeanSquaredErrorQualityParameterName = "BestTestMeanSquaredError";
    76 
    77     private const string TestAverageRelativeErrorQualityParameterName = "TestAverageRelativeError";
    78     private const string MinTestAverageRelativeErrorQualityParameterName = "MinTestAverageRelativeError";
    79     private const string MaxTestAverageRelativeErrorQualityParameterName = "MaxTestAverageRelativeError";
    80     private const string AverageTestAverageRelativeErrorQualityParameterName = "AverageTestAverageRelativeError";
    81     private const string BestTestAverageRelativeErrorQualityParameterName = "BestTestAverageRelativeError";
    82 
    83     private const string TestRSquaredQualityParameterName = "TestRSquared";
    84     private const string MinTestRSquaredQualityParameterName = "MinTestRSquared";
    85     private const string MaxTestRSquaredQualityParameterName = "MaxTestRSquared";
    86     private const string AverageTestRSquaredQualityParameterName = "AverageTestRSquared";
    87     private const string BestTestRSquaredQualityParameterName = "BestTestRSquared";
    88 
    89     private const string RSquaredValuesParameterName = "R-squared Values";
    90     private const string MeanSquaredErrorValuesParameterName = "Mean Squared Error Values";
    91     private const string RelativeErrorValuesParameterName = "Average Relative Error Values";
     53    private const string TrainingMeanSquaredErrorQualityParameterName = "Mean squared error (training)";
     54    private const string MinTrainingMeanSquaredErrorQualityParameterName = "Min mean squared error (training)";
     55    private const string MaxTrainingMeanSquaredErrorQualityParameterName = "Max mean squared error (training)";
     56    private const string AverageTrainingMeanSquaredErrorQualityParameterName = "Average mean squared error (training)";
     57    private const string BestTrainingMeanSquaredErrorQualityParameterName = "Best mean squared error (training)";
     58
     59    private const string TrainingAverageRelativeErrorQualityParameterName = "Average relative error (training)";
     60    private const string MinTrainingAverageRelativeErrorQualityParameterName = "Min average relative error (training)";
     61    private const string MaxTrainingAverageRelativeErrorQualityParameterName = "Max average relative error (training)";
     62    private const string AverageTrainingAverageRelativeErrorQualityParameterName = "Average average relative error (training)";
     63    private const string BestTrainingAverageRelativeErrorQualityParameterName = "Best average relative error (training)";
     64
     65    private const string TrainingRSquaredQualityParameterName = "R² (training)";
     66    private const string MinTrainingRSquaredQualityParameterName = "Min R² (training)";
     67    private const string MaxTrainingRSquaredQualityParameterName = "Max R² (training)";
     68    private const string AverageTrainingRSquaredQualityParameterName = "Average R² (training)";
     69    private const string BestTrainingRSquaredQualityParameterName = "Best R² (training)";
     70
     71    private const string TestMeanSquaredErrorQualityParameterName = "Mean squared error (test)";
     72    private const string MinTestMeanSquaredErrorQualityParameterName = "Min mean squared error (test)";
     73    private const string MaxTestMeanSquaredErrorQualityParameterName = "Max mean squared error (test)";
     74    private const string AverageTestMeanSquaredErrorQualityParameterName = "Average mean squared error (test)";
     75    private const string BestTestMeanSquaredErrorQualityParameterName = "Best mean squared error (test)";
     76
     77    private const string TestAverageRelativeErrorQualityParameterName = "Average relative error (test)";
     78    private const string MinTestAverageRelativeErrorQualityParameterName = "Min average relative error (test)";
     79    private const string MaxTestAverageRelativeErrorQualityParameterName = "Max average relative error (test)";
     80    private const string AverageTestAverageRelativeErrorQualityParameterName = "Average average relative error (test)";
     81    private const string BestTestAverageRelativeErrorQualityParameterName = "Best average relative error (test)";
     82
     83    private const string TestRSquaredQualityParameterName = "R² (test)";
     84    private const string MinTestRSquaredQualityParameterName = "Min R² (test)";
     85    private const string MaxTestRSquaredQualityParameterName = "Max R² (test)";
     86    private const string AverageTestRSquaredQualityParameterName = "Average R² (test)";
     87    private const string BestTestRSquaredQualityParameterName = "Best R² (test)";
     88
     89    private const string RSquaredValuesParameterName = "R²";
     90    private const string MeanSquaredErrorValuesParameterName = "Mean squared error";
     91    private const string RelativeErrorValuesParameterName = "Average relative error";
    9292
    9393    private const string TrainingSamplesStartParameterName = "TrainingSamplesStart";
     
    132132
    133133    [Storable]
    134     private SymbolicRegressionModelQualityCalculator trainingQualityCalculator;
    135     [Storable]
    136     private SymbolicRegressionModelQualityCalculator testQualityCalculator;
     134    private UniformSubScopesProcessor subScopesProcessor;
    137135    [Storable]
    138136    private MinAverageMaxValueAnalyzer minAvgMaxTrainingMseAnalyzer;
     
    165163
    166164      #region operator initialization
    167       trainingQualityCalculator = new SymbolicRegressionModelQualityCalculator();
    168       testQualityCalculator = new SymbolicRegressionModelQualityCalculator();
     165      subScopesProcessor = new UniformSubScopesProcessor();
     166      SymbolicRegressionModelQualityCalculator trainingQualityCalculator = new SymbolicRegressionModelQualityCalculator();
     167      SymbolicRegressionModelQualityCalculator testQualityCalculator = new SymbolicRegressionModelQualityCalculator();
    169168      minAvgMaxTrainingMseAnalyzer = new MinAverageMaxValueAnalyzer();
    170169      minAvgMaxTestMseAnalyzer = new MinAverageMaxValueAnalyzer();
     
    178177
    179178      #region parameter wiring
     179      subScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth;
    180180      trainingQualityCalculator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
    181181      trainingQualityCalculator.ProblemDataParameter.ActualName = ProblemDataParameter.Name;
     
    184184      trainingQualityCalculator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
    185185      trainingQualityCalculator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
    186       trainingQualityCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    187186      trainingQualityCalculator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
    188187      trainingQualityCalculator.AverageRelativeErrorQualityParameter.ActualName = TrainingAverageRelativeErrorQualityParameterName;
     
    196195      testQualityCalculator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
    197196      testQualityCalculator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
    198       testQualityCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    199197      testQualityCalculator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
    200198      testQualityCalculator.AverageRelativeErrorQualityParameter.ActualName = TestAverageRelativeErrorQualityParameterName;
     
    209207      minAvgMaxTrainingMseAnalyzer.ValuesParameter.ActualName = MeanSquaredErrorValuesParameterName;
    210208      minAvgMaxTrainingMseAnalyzer.ResultsParameter.ActualName = ResultsParameter.Name;
     209      minAvgMaxTrainingMseAnalyzer.CollectMinValueInResultsParameter.Value = new BoolValue(false);
     210      minAvgMaxTrainingMseAnalyzer.CollectAverageValueInResultsParameter.Value = new BoolValue(false);
     211      minAvgMaxTrainingMseAnalyzer.CollectMaxValueInResultsParameter.Value = new BoolValue(false);
    211212
    212213      minAvgMaxTestMseAnalyzer.ValueParameter.ActualName = TestMeanSquaredErrorQualityParameterName;
     
    217218      minAvgMaxTestMseAnalyzer.ValuesParameter.ActualName = MeanSquaredErrorValuesParameterName;
    218219      minAvgMaxTestMseAnalyzer.ResultsParameter.ActualName = ResultsParameter.Name;
     220      minAvgMaxTestMseAnalyzer.CollectMinValueInResultsParameter.Value = new BoolValue(false);
     221      minAvgMaxTestMseAnalyzer.CollectAverageValueInResultsParameter.Value = new BoolValue(false);
     222      minAvgMaxTestMseAnalyzer.CollectMaxValueInResultsParameter.Value = new BoolValue(false);
     223
    219224      #endregion
    220225      #region training/test R²
     
    226231      minAvgMaxTrainingRSquaredAnalyzer.ValuesParameter.ActualName = RSquaredValuesParameterName;
    227232      minAvgMaxTrainingRSquaredAnalyzer.ResultsParameter.ActualName = ResultsParameter.Name;
     233      minAvgMaxTrainingRSquaredAnalyzer.CollectMinValueInResultsParameter.Value = new BoolValue(false);
     234      minAvgMaxTrainingRSquaredAnalyzer.CollectAverageValueInResultsParameter.Value = new BoolValue(false);
     235      minAvgMaxTrainingRSquaredAnalyzer.CollectMaxValueInResultsParameter.Value = new BoolValue(false);
     236
    228237
    229238      minAvgMaxTestRSquaredAnalyzer.ValueParameter.ActualName = TestRSquaredQualityParameterName;
     
    234243      minAvgMaxTestRSquaredAnalyzer.ValuesParameter.ActualName = RSquaredValuesParameterName;
    235244      minAvgMaxTestRSquaredAnalyzer.ResultsParameter.ActualName = ResultsParameter.Name;
     245      minAvgMaxTestRSquaredAnalyzer.CollectMinValueInResultsParameter.Value = new BoolValue(false);
     246      minAvgMaxTestRSquaredAnalyzer.CollectAverageValueInResultsParameter.Value = new BoolValue(false);
     247      minAvgMaxTestRSquaredAnalyzer.CollectMaxValueInResultsParameter.Value = new BoolValue(false);
     248
    236249      #endregion
    237250      #region training/test avg. rel. error
     
    243256      minAvgMaxTrainingRelErrorAnalyzer.ValuesParameter.ActualName = RelativeErrorValuesParameterName;
    244257      minAvgMaxTrainingRelErrorAnalyzer.ResultsParameter.ActualName = ResultsParameter.Name;
     258      minAvgMaxTrainingRelErrorAnalyzer.CollectMinValueInResultsParameter.Value = new BoolValue(false);
     259      minAvgMaxTrainingRelErrorAnalyzer.CollectAverageValueInResultsParameter.Value = new BoolValue(false);
     260      minAvgMaxTrainingRelErrorAnalyzer.CollectMaxValueInResultsParameter.Value = new BoolValue(false);
    245261
    246262      minAvgMaxTestRelErrorAnalyzer.ValueParameter.ActualName = TestAverageRelativeErrorQualityParameterName;
     
    251267      minAvgMaxTestRelErrorAnalyzer.ValuesParameter.ActualName = RelativeErrorValuesParameterName;
    252268      minAvgMaxTestRelErrorAnalyzer.ResultsParameter.ActualName = ResultsParameter.Name;
     269      minAvgMaxTestRelErrorAnalyzer.CollectMinValueInResultsParameter.Value = new BoolValue(false);
     270      minAvgMaxTestRelErrorAnalyzer.CollectAverageValueInResultsParameter.Value = new BoolValue(false);
     271      minAvgMaxTestRelErrorAnalyzer.CollectMaxValueInResultsParameter.Value = new BoolValue(false);
    253272      #endregion
    254273      #endregion
    255274
    256275      #region operator graph
    257       OperatorGraph.InitialOperator = trainingQualityCalculator;
     276      OperatorGraph.InitialOperator = subScopesProcessor;
     277      subScopesProcessor.Operator = trainingQualityCalculator;
    258278      trainingQualityCalculator.Successor = testQualityCalculator;
    259       testQualityCalculator.Successor = minAvgMaxTrainingMseAnalyzer;
     279      testQualityCalculator.Successor = null;
     280      subScopesProcessor.Successor = minAvgMaxTrainingMseAnalyzer;
    260281      minAvgMaxTrainingMseAnalyzer.Successor = minAvgMaxTestMseAnalyzer;
    261282      minAvgMaxTestMseAnalyzer.Successor = minAvgMaxTrainingRSquaredAnalyzer;
     
    284305
    285306    private void SymbolicExpressionTreeParameter_DepthChanged(object sender, EventArgs e) {
    286       trainingQualityCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    287       testQualityCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
     307      subScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth;
    288308      minAvgMaxTrainingMseAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    289309      minAvgMaxTrainingRelErrorAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeParameter.Depth;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityCalculator.cs

    r3683 r3710  
    5757
    5858    #region parameter properties
    59     public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
    60       get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     59    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
     60      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
    6161    }
    6262    public IValueLookupParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
     
    9191    public SymbolicRegressionModelQualityCalculator()
    9292      : base() {
     93      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree to analyze."));
    9394      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic expression tree."));
    94       Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree to analyze."));
    9595      Parameters.Add(new ValueLookupParameter<DataAnalysisProblemData>(ProblemDataParameterName, "The problem data containing the input varaibles for the symbolic regression problem."));
    9696      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The first index of the data set partition on which the model quality values should be calculated."));
     
    102102      Parameters.Add(new ValueLookupParameter<DoubleValue>(RSQuaredQualityParameterName, "The R² correlation coefficient of the output of the model and the original target values."));
    103103      Parameters.Add(new ValueLookupParameter<DoubleValue>(RelativeErrorQualityParameterName, "The average relative percentage error of the output of the model."));
     104     
    104105      #region operator initialization
    105106      SimpleSymbolicRegressionEvaluator simpleEvaluator = new SimpleSymbolicRegressionEvaluator();
     
    143144
    144145    }
    145 
    146     // need to create custom operations for each solution scope (this has to be adapted on basis of the depth value of SymbolicExpressionTreeParameter)
    147     public override IOperation Apply() {
    148       var scopes = GetScopesOnLevel(ExecutionContext.Scope, SymbolicExpressionTreeParameter.Depth);
    149       OperationCollection operations = new OperationCollection();
    150       foreach (IScope treeScopes in scopes) {
    151         operations.Add(ExecutionContext.CreateChildOperation(OperatorGraph.InitialOperator, treeScopes));
    152       }
    153       if (Successor != null) operations.Add(ExecutionContext.CreateOperation(Successor));
    154       return operations;
    155     }
    156 
    157     private IEnumerable<IScope> GetScopesOnLevel(IScope scope, int d) {
    158       if (d == 0) yield return scope;
    159       else {
    160         foreach (IScope subScope in scope.SubScopes) {
    161           foreach (IScope scopesOfSubScope in GetScopesOnLevel(subScope, d - 1)) {
    162             yield return scopesOfSubScope;
    163           }
    164         }
    165       }
    166     }
    167146  }
    168147}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionSolutionLinearScaler.cs

    r3683 r3710  
    4747    private const string BetaParameterName = "Beta";
    4848
    49     public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
    50       get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     49    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
     50      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
    5151    }
    52     public ScopeTreeLookupParameter<SymbolicExpressionTree> ScaledSymbolicExpressionTreeParameter {
    53       get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[ScaledSymbolicExpressionTreeParameterName]; }
     52    public ILookupParameter<SymbolicExpressionTree> ScaledSymbolicExpressionTreeParameter {
     53      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[ScaledSymbolicExpressionTreeParameterName]; }
    5454    }
    55     public ScopeTreeLookupParameter<DoubleValue> AlphaParameter {
    56       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters[AlphaParameterName]; }
     55    public ILookupParameter<DoubleValue> AlphaParameter {
     56      get { return (ILookupParameter<DoubleValue>)Parameters[AlphaParameterName]; }
    5757    }
    58     public ScopeTreeLookupParameter<DoubleValue> BetaParameter {
    59       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters[BetaParameterName]; }
     58    public ILookupParameter<DoubleValue> BetaParameter {
     59      get { return (ILookupParameter<DoubleValue>)Parameters[BetaParameterName]; }
    6060    }
    6161
    6262    public SymbolicRegressionSolutionLinearScaler()
    6363      : base() {
    64       Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees to transform."));
    65       Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(ScaledSymbolicExpressionTreeParameterName, "The resulting symbolic expression trees after transformation."));
    66       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(AlphaParameterName, "Alpha parameter for linear transformation."));
    67       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(BetaParameterName, "Beta parameter for linear transformation."));
     64      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees to transform."));
     65      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(ScaledSymbolicExpressionTreeParameterName, "The resulting symbolic expression trees after transformation."));
     66      Parameters.Add(new LookupParameter<DoubleValue>(AlphaParameterName, "Alpha parameter for linear transformation."));
     67      Parameters.Add(new LookupParameter<DoubleValue>(BetaParameterName, "Beta parameter for linear transformation."));
    6868    }
    6969
    7070    public override IOperation Apply() {
    71       ItemArray<SymbolicExpressionTree> trees = SymbolicExpressionTreeParameter.ActualValue;
    72       ItemArray<DoubleValue> alphas = AlphaParameter.ActualValue;
    73       ItemArray<DoubleValue> betas = BetaParameter.ActualValue;
    74       ItemArray<SymbolicExpressionTree> scaledTrees = new ItemArray<SymbolicExpressionTree>(trees.Length);
    75       for (int i = 0; i < trees.Length; i++) {
    76         var mainBranch = trees[i].Root.SubTrees[0].SubTrees[0];
    77         var scaledMainBranch = MakeSum(MakeProduct(betas[i].Value, mainBranch), alphas[i].Value);
     71      SymbolicExpressionTree tree = SymbolicExpressionTreeParameter.ActualValue;
     72      DoubleValue alpha = AlphaParameter.ActualValue;
     73      DoubleValue beta = BetaParameter.ActualValue;
     74      var mainBranch = tree.Root.SubTrees[0].SubTrees[0];
     75      var scaledMainBranch = MakeSum(MakeProduct(beta.Value, mainBranch), alpha.Value);
    7876
    79         // remove the main branch before cloning to prevent cloning of sub-trees
    80         trees[i].Root.SubTrees[0].RemoveSubTree(0);
    81         var scaledTree = (SymbolicExpressionTree)trees[i].Clone();
    82         // insert main branch into the original tree again
    83         trees[i].Root.SubTrees[0].InsertSubTree(0, mainBranch);
    84         // insert the scaled main branch into the cloned tree
    85         scaledTree.Root.SubTrees[0].InsertSubTree(0, scaledMainBranch);
    86         scaledTrees[i] = scaledTree;
    87       }
    88       ScaledSymbolicExpressionTreeParameter.ActualValue = scaledTrees;
     77      // remove the main branch before cloning to prevent cloning of sub-trees
     78      tree.Root.SubTrees[0].RemoveSubTree(0);
     79      var scaledTree = (SymbolicExpressionTree)tree.Clone();
     80      // insert main branch into the original tree again
     81      tree.Root.SubTrees[0].InsertSubTree(0, mainBranch);
     82      // insert the scaled main branch into the cloned tree
     83      scaledTree.Root.SubTrees[0].InsertSubTree(0, scaledMainBranch);
     84      ScaledSymbolicExpressionTreeParameter.ActualValue = scaledTree;
    8985      return base.Apply();
    9086    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs

    r3683 r3710  
    5656    private const string AlphaParameterName = "Alpha";
    5757    private const string BetaParameterName = "Beta";
    58     private const string BestSolutionParameterName = "ValidationBestSolution";
    59     private const string BestSolutionQualityParameterName = "ValidationBestSolutionQuality";
     58    private const string BestSolutionParameterName = "Best solution (validation)";
     59    private const string BestSolutionQualityParameterName = "Best solution quality (validation)";
     60    private const string CurrentBestValidationQualityParameterName = "Current best validation quality";
    6061    private const string ResultsParameterName = "Results";
    6162
     
    9192    }
    9293
    93     [Storable]
    94     private BestQualityMemorizer validationQualityMemorizer;
    9594    [Storable]
    9695    private BestSymbolicRegressionSolutionAnalyzer bestSolutionAnalyzer;
    9796    [Storable]
    98     private SymbolicRegressionSolutionLinearScaler linearScaler;
     97    private UniformSubScopesProcessor subScopesProcessor;
    9998    [Storable]
    100     private SymbolicRegressionMeanSquaredErrorCalculator validationMseCalculator;
     99    private BestAverageWorstQualityCalculator bestAvgWorstValidationQualityCalculator;
    101100
    102101    public ValidationBestScaledSymbolicRegressionSolutionAnalyzer()
     
    114113
    115114      #region operator initialization
    116       linearScaler = new SymbolicRegressionSolutionLinearScaler();
    117       validationMseCalculator = new SymbolicRegressionMeanSquaredErrorCalculator();
     115      subScopesProcessor = new UniformSubScopesProcessor();
     116      SymbolicRegressionSolutionLinearScaler linearScaler = new SymbolicRegressionSolutionLinearScaler();
     117      SymbolicRegressionMeanSquaredErrorEvaluator validationMseEvaluator = new SymbolicRegressionMeanSquaredErrorEvaluator();
    118118      bestSolutionAnalyzer = new BestSymbolicRegressionSolutionAnalyzer();
    119       validationQualityMemorizer = new BestQualityMemorizer();
    120       BestAverageWorstQualityCalculator bestAvgWorstValidationQualityCalculator = new BestAverageWorstQualityCalculator();
     119       bestAvgWorstValidationQualityCalculator = new BestAverageWorstQualityCalculator();
    121120      DataTableValuesCollector validationValuesCollector = new DataTableValuesCollector();
    122121      ResultsCollector resultsCollector = new ResultsCollector();
     
    124123
    125124      #region parameter wiring
     125      subScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth;
     126
    126127      linearScaler.AlphaParameter.ActualName = AlphaParameterName;
    127       linearScaler.AlphaParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    128128      linearScaler.BetaParameter.ActualName = BetaParameterName;
    129       linearScaler.BetaParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    130129      linearScaler.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
    131       linearScaler.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    132130      linearScaler.ScaledSymbolicExpressionTreeParameter.ActualName = ScaledSymbolicExpressionTreeParameterName;
    133       linearScaler.ScaledSymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    134 
    135       validationMseCalculator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
    136       validationMseCalculator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
    137       validationMseCalculator.SymbolicExpressionTreeParameter.ActualName = ScaledSymbolicExpressionTreeParameterName;
    138       validationMseCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    139       validationMseCalculator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
    140       validationMseCalculator.QualityParameter.ActualName = QualityParameterName;
    141       validationMseCalculator.ProblemDataParameter.ActualName = ProblemDataParameter.Name;
    142       validationMseCalculator.SamplesStartParameter.ActualName = SamplesStartParameter.Name;
    143       validationMseCalculator.SamplesEndParameter.ActualName = SamplesEndParameter.Name;
     131
     132      validationMseEvaluator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
     133      validationMseEvaluator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
     134      validationMseEvaluator.SymbolicExpressionTreeParameter.ActualName = ScaledSymbolicExpressionTreeParameterName;
     135      validationMseEvaluator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
     136      validationMseEvaluator.QualityParameter.ActualName = QualityParameterName;
     137      validationMseEvaluator.RegressionProblemDataParameter.ActualName = ProblemDataParameter.Name;
     138      validationMseEvaluator.SamplesStartParameter.ActualName = SamplesStartParameter.Name;
     139      validationMseEvaluator.SamplesEndParameter.ActualName = SamplesEndParameter.Name;
    144140
    145141      bestSolutionAnalyzer.BestSolutionParameter.ActualName = BestSolutionParameter.Name;
     
    154150      bestSolutionAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
    155151
    156       bestAvgWorstValidationQualityCalculator.AverageQualityParameter.ActualName = "Current Average Validation Quality";
    157       bestAvgWorstValidationQualityCalculator.BestQualityParameter.ActualName = "Current Best Validation Quality";
     152      bestAvgWorstValidationQualityCalculator.AverageQualityParameter.ActualName = "Current average validation quality";
     153      bestAvgWorstValidationQualityCalculator.BestQualityParameter.ActualName = CurrentBestValidationQualityParameterName;
    158154      bestAvgWorstValidationQualityCalculator.MaximizationParameter.Value = new BoolValue(false);
    159155      bestAvgWorstValidationQualityCalculator.QualityParameter.ActualName = QualityParameterName;
    160       bestAvgWorstValidationQualityCalculator.WorstQualityParameter.ActualName = "Current Worst Validation Quality";
    161 
    162       validationQualityMemorizer.BestQualityParameter.ActualName = "Best Validation Quality";
    163       validationQualityMemorizer.QualityParameter.ActualName = QualityParameterName;
    164       validationQualityMemorizer.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    165 
    166       validationValuesCollector.DataTableParameter.ActualName = "Validation Qualities";
    167       validationValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best Validation Quality", null, "Current Best Validation Quality"));
    168       validationValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Validation Quality", null, "Best Validation Quality"));
    169 
    170       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best Validation Quality", null, "Current Best Validation Quality"));
    171       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Validation Quality", null, "Best Validation Quality"));
    172       resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("Validation Qualities"));
     156      bestAvgWorstValidationQualityCalculator.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth;
     157      bestAvgWorstValidationQualityCalculator.WorstQualityParameter.ActualName = "Current worst validation quality";
     158
     159      validationValuesCollector.DataTableParameter.ActualName = "Validation quality";
     160      validationValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>(CurrentBestValidationQualityParameterName, null, CurrentBestValidationQualityParameterName));
     161      validationValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>(BestSolutionQualityParameter.Name, null, BestSolutionQualityParameter.Name));
     162
     163      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>(CurrentBestValidationQualityParameterName, null, CurrentBestValidationQualityParameterName));
     164      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>(BestSolutionQualityParameter.Name, null, BestSolutionQualityParameter.Name));
     165      resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("Validation quality"));
    173166      resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
    174167      #endregion
    175168
    176169      #region operator graph
    177       OperatorGraph.InitialOperator = linearScaler;
    178       linearScaler.Successor = validationMseCalculator;
    179       validationMseCalculator.Successor = bestSolutionAnalyzer;
     170      OperatorGraph.InitialOperator = subScopesProcessor;
     171      subScopesProcessor.Operator = linearScaler;
     172      linearScaler.Successor = validationMseEvaluator;
     173      validationMseEvaluator.Successor = null;
     174      subScopesProcessor.Successor = bestSolutionAnalyzer;
    180175      bestSolutionAnalyzer.Successor = bestAvgWorstValidationQualityCalculator;
    181       bestAvgWorstValidationQualityCalculator.Successor = validationQualityMemorizer;
    182       validationQualityMemorizer.Successor = validationValuesCollector;
     176      bestAvgWorstValidationQualityCalculator.Successor = validationValuesCollector;
    183177      validationValuesCollector.Successor = resultsCollector;
    184178      resultsCollector.Successor = null;
     
    203197
    204198    private void SymbolicExpressionTreeParameter_DepthChanged(object sender, EventArgs e) {
    205       validationMseCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    206       validationQualityMemorizer.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth;
     199      subScopesProcessor.Depth.Value = SymbolicExpressionTreeParameter.Depth;
    207200      bestSolutionAnalyzer.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    208201      bestSolutionAnalyzer.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    209       linearScaler.AlphaParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    210       linearScaler.BetaParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    211       linearScaler.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    212       linearScaler.ScaledSymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
     202      bestAvgWorstValidationQualityCalculator.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth;
    213203    }
    214204  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionSolution.cs

    r3513 r3710  
    2828using System.Collections.Generic;
    2929using System.Linq;
     30using System.Drawing;
    3031
    3132namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
     
    3637  [StorableClass]
    3738  public sealed class SymbolicRegressionSolution : DataAnalysisSolution {
     39    public override Image ItemImage {
     40      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Function; }
     41    }
    3842    [Storable]
    3943    private SymbolicRegressionModel model;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.cs

    r3707 r3710  
    122122
    123123    private void UpdateCursorInterval() {
    124       var estimatedValues = this.chart.Series[ALL_SERIES].Points.Select(x => x.YValues[0]).DefaultIfEmpty(1.0);
    125       var targetValues = this.chart.Series[ALL_SERIES].Points.Select(x => x.YValues[1]).DefaultIfEmpty(1.0);
     124      var estimatedValues = this.chart.Series[ALL_SERIES].Points.Select(x => x.XValue).DefaultIfEmpty(1.0);
     125      var targetValues = this.chart.Series[ALL_SERIES].Points.Select(x => x.YValues[0]).DefaultIfEmpty(1.0);
    126126      double estimatedValuesRange = estimatedValues.Max() - estimatedValues.Min();
    127127      double targetValuesRange = targetValues.Max() - targetValues.Min();
     
    170170      this.chart.Series[ALL_SERIES].Points.Clear();
    171171      this.chart.Series[TRAINING_SERIES].Points.Clear();
    172       this.chart.Series[TEST_SERIES].Points.Clear();     
     172      this.chart.Series[TEST_SERIES].Points.Clear();
    173173    }
    174174
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisSolution.cs

    r3549 r3710  
    7878    public abstract IEnumerable<double> EstimatedTestValues { get; }
    7979
    80     protected DataAnalysisSolution() : base() { }
     80    protected DataAnalysisSolution() : base() {
     81      Name = ItemName;
     82      Description = ItemDescription;
     83    }
    8184    protected DataAnalysisSolution(DataAnalysisProblemData problemData) : this(problemData, double.NegativeInfinity, double.PositiveInfinity) { }
    8285    protected DataAnalysisSolution(DataAnalysisProblemData problemData, double lowerEstimationLimit, double upperEstimationLimit)
Note: See TracChangeset for help on using the changeset viewer.