Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/09/11 10:45:50 (13 years ago)
Author:
gkronber
Message:

#1557 implemented parallel evaluation in analyzers using ParallelEnumerable extension methods.

File:
1 edited

Legend:

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

    r5907 r6728  
    7979
    8080      double[] trainingQuality = QualityParameter.ActualValue.Select(x => x.Value).ToArray();
     81      var problemData = ProblemDataParameter.ActualValue;
     82      var evaluator = EvaluatorParameter.ActualValue;
    8183      // evaluate on validation partition
    82       IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(EvaluatorParameter.ActualValue);
    83       double[] validationQuality = (from tree in SymbolicExpressionTree
    84                                     select EvaluatorParameter.ActualValue.Evaluate(childContext, tree, ProblemDataParameter.ActualValue, rows))
    85                                    .ToArray();
     84      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
     85      double[] validationQuality = SymbolicExpressionTree
     86        .AsParallel()
     87        .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
     88        .ToArray();
    8689      double r = 0.0;
    8790      try {
Note: See TracChangeset for help on using the changeset viewer.