Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/08/11 13:04:00 (14 years ago)
Author:
gkronber
Message:

Added calculation of length and height of best solution to FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer. #1368

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Analyzers/RegressionSolutionAnalyzer.cs

    r5199 r5246  
    123123    }
    124124
    125     public static void UpdateBestSolutionResults(DataAnalysisSolution bestSolution, DataAnalysisProblemData problemData, ResultCollection results, IntValue CurrentGeneration) {
    126       var solution = bestSolution;
     125    public static void UpdateBestSolutionResults(DataAnalysisSolution solution, DataAnalysisProblemData problemData, ResultCollection results, IntValue generation) {
    127126      #region update R2,MSE, Rel Error
    128127      IEnumerable<double> trainingValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable.Value, problemData.TrainingIndizes);
     
    170169        results[BestSolutionTrainingRelativeError].Value = new DoubleValue(trainingRelError);
    171170        results[BestSolutionTestRelativeError].Value = new DoubleValue(testRelError);
    172         if (CurrentGeneration != null) // this check is needed because linear regression solutions do not have a generations parameter
    173           results[BestSolutionGeneration].Value = new IntValue(CurrentGeneration.Value);
     171        if (generation != null) // this check is needed because linear regression solutions do not have a generations parameter
     172          results[BestSolutionGeneration].Value = new IntValue(generation.Value);
    174173      } else {
    175174        results.Add(new Result(BestSolutionResultName, solution));
     
    180179        results.Add(new Result(BestSolutionTrainingRelativeError, new DoubleValue(trainingRelError)));
    181180        results.Add(new Result(BestSolutionTestRelativeError, new DoubleValue(testRelError)));
    182         if (CurrentGeneration != null)
    183           results.Add(new Result(BestSolutionGeneration, new IntValue(CurrentGeneration.Value)));
     181        if (generation != null)
     182          results.Add(new Result(BestSolutionGeneration, new IntValue(generation.Value)));
    184183      }
    185184      #endregion
Note: See TracChangeset for help on using the changeset viewer.