Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/11/10 13:06:42 (14 years ago)
Author:
mkommend
Message:

implemented InteractiveSymbolicRegressionSolutionSimplifierView and fixed lots of minor bugs in the DataAnalysis and DataAnalysis.Views project (ticket #1010)

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/BestSymbolicRegressionSolutionAnalyzer.cs

    r3905 r3915  
    9797      if (BestSolutionQualityParameter.ActualValue == null || BestSolutionQualityParameter.ActualValue.Value > Quality[i].Value) {
    9898        var model = new SymbolicRegressionModel((ISymbolicExpressionTreeInterpreter)SymbolicExpressionTreeInterpreter.Clone(),
    99           SymbolicExpressionTree[i],
    100           GetInputVariables(SymbolicExpressionTree[i]));
     99          SymbolicExpressionTree[i]);
    101100        var solution = new SymbolicRegressionSolution(ProblemData, model, lowerEstimationLimit, upperEstimationLimit);
    102101
     
    134133    }
    135134
    136     private IEnumerable<string> GetInputVariables(SymbolicExpressionTree tree) {
    137       return (from varNode in tree.IterateNodesPrefix().OfType<VariableTreeNode>()
    138               select varNode.VariableName).Distinct();
    139     }
    140135  }
    141136}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionModel.cs

    r3884 r3915  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Drawing;
    2425using System.Linq;
    25 using System.Drawing;
    2626using HeuristicLab.Common;
    2727using HeuristicLab.Core;
    2828using HeuristicLab.Data;
     29using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     30using HeuristicLab.Operators;
    2931using HeuristicLab.Optimization;
    3032using HeuristicLab.Parameters;
    3133using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3234using HeuristicLab.PluginInfrastructure;
    33 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    3435using HeuristicLab.Problems.DataAnalysis;
    35 using HeuristicLab.Operators;
    3636using HeuristicLab.Problems.DataAnalysis.Symbolic;
     37using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
    3738
    3839namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
     
    4546      : base(deserializing) {
    4647    }
    47     public SymbolicRegressionModel(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree tree, IEnumerable<string> inputVariables)
     48    public SymbolicRegressionModel(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree tree)
    4849      : base() {
    4950      this.tree = tree;
    5051      this.interpreter = interpreter;
    51       this.inputVariables = inputVariables.ToList();
     52      this.inputVariables = tree.IterateNodesPrefix().OfType<VariableTreeNode>().Select(var => var.VariableName).Distinct().ToList();
    5253    }
    5354
     
    6667    public IEnumerable<string> InputVariables {
    6768      get { return inputVariables.AsEnumerable(); }
    68       set {
    69         if (value != null)
    70           inputVariables = new List<string>(value);
    71       }
    7269    }
    7370
Note: See TracChangeset for help on using the changeset viewer.