Changeset 14016 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/ExpressionEvaluator.cs
- Timestamp:
- 07/07/16 13:17:30 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/ExpressionEvaluator.cs
r14015 r14016 89 89 90 90 // pred must be allocated by the caller 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) { 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) { 94 93 Contract.Assert(pred != null && pred.Length >= vLen); 95 94 int topOfStack = -1; … … 154 153 } 155 154 case (byte)OpCodes.Log: { 156 if (adjust Parameters) {155 if (adjustOffsetForLogAndExp) { 157 156 // here we assume that the last used parameter is c in log(f(x) + c) 158 157 // this must match actions for producing code in the automaton! … … 175 174 } 176 175 case (byte)OpCodes.Exp: { 177 if (adjust Parameters) {176 if (adjustOffsetForLogAndExp) { 178 177 // here we assume that the last used parameter is c in exp(f(x) * c) 179 178 // this must match actions for producing code in the automaton!
Note: See TracChangeset
for help on using the changeset viewer.