Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/15/10 18:42:21 (15 years ago)
Author:
gkronber
Message:

Fixed another problem in the operator for transformation of networks to closed-form function trees. #833 (Genetic Programming based search for equations (modeling with multiple target variables))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/NetworkToFunctionTransformer.cs

    r2630 r2631  
    5050      while (scope.SubScopes.Count > 0) scope.RemoveSubScope(scope.SubScopes[0]);
    5151
     52      var targetVariableEnumerator = targetVariables.Select(x => x.Data).GetEnumerator();
    5253      // create a new sub-scope for each target variable with the transformed expression
    5354      foreach (IFunctionTree transformedTree in Transform(model.FunctionTree, targetVariables.Select(x => x.Data))) {
     55        targetVariableEnumerator.MoveNext();
    5456        Scope exprScope = new Scope();
    5557        scope.AddSubScope(exprScope);
    5658        exprScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("FunctionTree"), new GeneticProgrammingModel(transformedTree)));
     59        exprScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("TargetVariable"), new StringData(targetVariableEnumerator.Current)));
    5760      }
    5861
Note: See TracChangeset for help on using the changeset viewer.