Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/02/15 16:14:45 (10 years ago)
Author:
mkommend
Message:

#2175: Merged trunk changes.

Location:
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisModelComplexityAnalyzer.cs

    r11407 r11861  
    5252            double complexity = 1;
    5353            for (int i = 0; i < node.SubtreeCount; i++) {
    54               complexity *= CalculateComplexity(node.GetSubtree(i));
     54              var nodeComplexity = CalculateComplexity(node.GetSubtree(i));
     55              complexity *=  nodeComplexity > 2 ? nodeComplexity : 2;
     56             
    5557            }
    5658            return complexity == 1 ? node.SubtreeCount : complexity;
     
    5961            double complexity = 1;
    6062            for (int i = 0; i < node.SubtreeCount; i++) {
    61               complexity *= CalculateComplexity(node.GetSubtree(i));
     63              var nodeComplexity = CalculateComplexity(node.GetSubtree(i));
     64              complexity *= nodeComplexity > 2 ? nodeComplexity : 2;
    6265            }
    63             return complexity;
     66            return complexity == 1 ? node.SubtreeCount : complexity;
    6467          }
    6568        case OpCodes.Sin: {
    6669            double complexity = CalculateComplexity(node.GetSubtree(0));
    67             return complexity * 10;
     70            return Math.Exp(complexity);
    6871          }
    6972        case OpCodes.Cos: {
    7073            double complexity = CalculateComplexity(node.GetSubtree(0));
    71             return complexity * 10;
     74            return Math.Exp(complexity);
    7275          }
    7376        case OpCodes.Tan: {
    7477            double complexity = CalculateComplexity(node.GetSubtree(0));
    75             return complexity * 10;
     78            return Math.Exp(complexity);
    7679          }
    7780        case OpCodes.Exp: {
    7881            double complexity = CalculateComplexity(node.GetSubtree(0));
    79             return complexity * 10;
    80           }
     82          return Math.Exp(complexity);
     83        }
    8184        case OpCodes.Log: {
    8285            double complexity = CalculateComplexity(node.GetSubtree(0));
    83             return complexity * 10;
     86            return Math.Exp(complexity);
    8487          }
    8588        case OpCodes.Square: {
    8689            double complexity = CalculateComplexity(node.GetSubtree(0));
    87             return 2 * complexity;
     90            return complexity * complexity;
    8891          }
    8992        case OpCodes.SquareRoot: {
    9093            double complexity = CalculateComplexity(node.GetSubtree(0));
    91             return 10 * complexity;
     94            return complexity * complexity * complexity;
    9295          }
    9396        case OpCodes.Power: {
  • branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationAnalyzer.cs

    r11310 r11861  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Optimization;
    2829using HeuristicLab.Parameters;
    2930using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3637  [StorableClass]
    3738  public abstract class SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U> : SymbolicDataAnalysisSingleObjectiveAnalyzer,
    38     ISymbolicDataAnalysisValidationAnalyzer<T, U>
     39    ISymbolicDataAnalysisValidationAnalyzer<T, U>, IStochasticOperator
    3940    where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U>
    4041    where U : class, IDataAnalysisProblemData {
Note: See TracChangeset for help on using the changeset viewer.