Changeset 13669 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/MctsSymbolicRegressionAlgorithm.cs
- Timestamp:
- 03/08/16 20:10:16 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/MctsSymbolicRegressionAlgorithm.cs
r13658 r13669 209 209 Results.Add(new Result("Iterations", iterations)); 210 210 211 var bestSolutionIteration = new IntValue(0); 212 Results.Add(new Result("Best solution iteration", bestSolutionIteration)); 213 211 214 var table = new DataTable("Qualities"); 212 215 table.Rows.Add(new DataRow("Best quality")); … … 261 264 double bestQ = 0.0; 262 265 double curBestQ = 0.0; 263 double q = 0.0;264 266 int n = 0; 265 267 // Loop until iteration limit reached or canceled. … … 267 269 cancellationToken.ThrowIfCancellationRequested(); 268 270 269 q = MctsSymbolicRegressionStatic.MakeStep(state);271 var q = MctsSymbolicRegressionStatic.MakeStep(state); 270 272 sumQ += q; // sum of qs in the last updateinterval iterations 271 273 curBestQ = Math.Max(q, curBestQ); // the best q in the last updateinterval iterations … … 274 276 // iteration results 275 277 if (n == updateInterval) { 278 if (bestQ > bestQuality.Value) { 279 bestSolutionIteration.Value = i; 280 } 276 281 bestQuality.Value = bestQ; 277 282 curQuality.Value = curBestQ; … … 295 300 // final results 296 301 if (n > 0) { 302 if (bestQ > bestQuality.Value) { 303 bestSolutionIteration.Value = iterations.Value + n; 304 } 297 305 bestQuality.Value = bestQ; 298 306 curQuality.Value = curBestQ;
Note: See TracChangeset
for help on using the changeset viewer.