Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/20/17 20:36:29 (6 years ago)
Author:
gkronber
Message:

#2852: moved the scaling parameters to the end of the parameter vector to be able to remove the c.Skip(2).ToArray() call and removed unnecessary .ToArray() calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs

    r15447 r15480  
    251251      if (node.Symbol is StartSymbol) {
    252252        if (addLinearScalingTerms) {
     253          var t = ConvertToAutoDiff(node.GetSubtree(0));
     254          // scaling variables α, β are given at the end of the parameter vector
    253255          var alpha = new AutoDiff.Variable();
    254256          var beta = new AutoDiff.Variable();
    255257          variables.Add(beta);
    256258          variables.Add(alpha);
    257           return ConvertToAutoDiff(node.GetSubtree(0)) * alpha + beta;
     259          return t * alpha + beta;
    258260        } else return ConvertToAutoDiff(node.GetSubtree(0));
    259261      }
Note: See TracChangeset for help on using the changeset viewer.