Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5260


Ignore:
Timestamp:
01/08/11 17:46:48 (14 years ago)
Author:
gkronber
Message:

Added overfitting analyzer to default operators of symbolic regression problems to make sure it also works correctly in cross-validation. #1356

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs

    r5098 r5260  
    147147    private void InitializeOperators() {
    148148      AddOperator(new FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer());
     149      AddOperator(new SymbolicRegressionOverfittingAnalyzer());
    149150      ParameterizeAnalyzers();
    150151    }
     
    160161      foreach (var analyzer in Analyzers) {
    161162        analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     163        var validationSolutionAnalyzer = analyzer as SymbolicRegressionValidationAnalyzer;
     164        if (validationSolutionAnalyzer != null) {
     165          validationSolutionAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
     166          validationSolutionAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
     167          validationSolutionAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
     168          validationSolutionAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
     169          validationSolutionAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     170          validationSolutionAnalyzer.ValidationSamplesStartParameter.Value = ValidationSamplesStart;
     171          validationSolutionAnalyzer.ValidationSamplesEndParameter.Value = ValidationSamplesEnd;
     172        }
     173
    162174        var fixedBestValidationSolutionAnalyzer = analyzer as FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer;
    163175        if (fixedBestValidationSolutionAnalyzer != null) {
    164           fixedBestValidationSolutionAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
    165           fixedBestValidationSolutionAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
    166           fixedBestValidationSolutionAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
    167           fixedBestValidationSolutionAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
    168           fixedBestValidationSolutionAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    169           fixedBestValidationSolutionAnalyzer.ValidationSamplesStartParameter.Value = ValidationSamplesStart;
    170           fixedBestValidationSolutionAnalyzer.ValidationSamplesEndParameter.Value = ValidationSamplesEnd;
    171176          fixedBestValidationSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
    172177        }
Note: See TracChangeset for help on using the changeset viewer.