Free cookie consent management tool by TermsFeed Policy Generator

# Changeset 11680 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs

Ignore:
Timestamp:
12/12/14 14:50:27 (10 years ago)
Message:

#2287: Extended constants optimization evaluator to be able to handle the square root symbol and changed optimization of square.

File:
1 edited

Unmodified
Added
Removed
• ## trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs

 r11171 eval: Math.Tan, diff: x => 1 + Math.Tan(x) * Math.Tan(x)); private static readonly Func square = UnaryFunc.Factory( eval: x => x * x, diff: x => 2 * x); private static readonly Func erf = UnaryFunc.Factory( eval: alglib.errorfunction, return true; } } if (node.Symbol is Square) { AutoDiff.Term t; if (!TryTransformToAutoDiff(node.GetSubtree(0), variables, parameters, variableNames, out t)) { term = null; return false; } else { term = AutoDiff.TermBuilder.Power(t, 2.0); return true; } } if (node.Symbol is SquareRoot) { AutoDiff.Term t; if (!TryTransformToAutoDiff(node.GetSubtree(0), variables, parameters, variableNames, out t)) { term = null; return false; } else { term = AutoDiff.TermBuilder.Power(t, 0.5); return true; } } if (node.Symbol is Sine) { AutoDiff.Term t; } else { term = tan(t); return true; } } if (node.Symbol is Square) { AutoDiff.Term t; if (!TryTransformToAutoDiff(node.GetSubtree(0), variables, parameters, variableNames, out t)) { term = null; return false; } else { term = square(t); return true; } !(n.Symbol is Logarithm) && !(n.Symbol is Exponential) && !(n.Symbol is SquareRoot) && !(n.Symbol is Square) && !(n.Symbol is Sine) && !(n.Symbol is Cosine) && !(n.Symbol is Tangent) && !(n.Symbol is Square) && !(n.Symbol is Erf) && !(n.Symbol is Norm) &&
Note: See TracChangeset for help on using the changeset viewer.