Changeset 15353 for branches/SimplifierViewsProgress/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Timestamp:
- 09/07/17 15:32:26 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SimplifierViewsProgress/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs
r15319 r15353 156 156 int maxIterations, bool updateVariableWeights = true, 157 157 double lowerEstimationLimit = double.MinValue, double upperEstimationLimit = double.MaxValue, 158 bool updateConstantsInTree = true, Action<double[], double, int> iterationReport= null) {158 bool updateConstantsInTree = true, Action<double[], double, object> iterationCallback = null) { 159 159 160 160 // numeric constants in the tree become variables for constant opt … … 210 210 alglib.ndimensional_pfunc function_cx_1_func = CreatePFunc(func); 211 211 alglib.ndimensional_pgrad function_cx_1_grad = CreatePGrad(func_grad); 212 213 int i = 0; 214 var xrep = new alglib.ndimensional_rep((a, f, o) => { 215 if (iterationReport != null) iterationReport(a, f, i++); 216 }); 212 alglib.ndimensional_rep xrep = null; 213 if (iterationCallback != null) 214 xrep = new alglib.ndimensional_rep(iterationCallback); 217 215 218 216 try { 219 217 alglib.lsfitcreatefg(x, y, c, n, m, k, false, out state); 220 218 alglib.lsfitsetcond(state, 0.0, 0.0, maxIterations); 221 alglib.lsfitsetxrep(state, iteration Report!= null);219 alglib.lsfitsetxrep(state, iterationCallback != null); 222 220 //alglib.lsfitsetgradientcheck(state, 0.001); 223 221 alglib.lsfitfit(state, function_cx_1_func, function_cx_1_grad, xrep, null);
Note: See TracChangeset
for help on using the changeset viewer.