Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/16 12:51:31 (8 years ago)
Author:
gkronber
Message:

#2612: added NaN handling for the evaluation of regression tree models (GBT)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/ExpressionEvaluator.cs

    r13652 r14015  
    8989
    9090    // pred must be allocated by the caller
    91     // if adjustOffsetForLogAndExp is set to true we determine c in log(c + f(x)) to make sure that c + f(x) is positive
    92     public void Exec(byte[] code, double[][] vars, double[] consts, double[] pred, bool adjustOffsetForLogAndExp = false) {
     91    // if adjustParameters is set to true we determine parameters in function to make sure that the function output is valid
     92    // e.g. in log(c + f(x)) to make sure that c + f(x) is positive
     93    public void Exec(byte[] code, double[][] vars, double[] consts, double[] pred, bool adjustParameters = false) {
    9394      Contract.Assert(pred != null && pred.Length >= vLen);
    9495      int topOfStack = -1;
     
    153154            }
    154155          case (byte)OpCodes.Log: {
    155               if (adjustOffsetForLogAndExp) {
     156              if (adjustParameters) {
    156157                // here we assume that the last used parameter is c in log(f(x) + c)
    157158                // this must match actions for producing code in the automaton!
     
    174175            }
    175176          case (byte)OpCodes.Exp: {
    176               if (adjustOffsetForLogAndExp) {
     177              if (adjustParameters) {
    177178                // here we assume that the last used parameter is c in exp(f(x) * c)
    178179                // this must match actions for producing code in the automaton!
Note: See TracChangeset for help on using the changeset viewer.