Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/11/11 15:03:46 (14 years ago)
Author:
gkronber
Message:

Merged changes from trunk to data analysis exploration branch and added fractional distance metric evaluator. #1142

Location:
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Operators
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Operators/CovariantParsimonyPressure.cs

    r5265 r5275  
    3232using HeuristicLab.Problems.DataAnalysis.Evaluators;
    3333using HeuristicLab.Analysis;
     34using HeuristicLab.Common;
    3435
    3536namespace HeuristicLab.Problems.DataAnalysis.Operators {
     
    8081    }
    8182
    82     public CovariantParsimonyPressure(bool deserializing) : base(deserializing) { }
     83    protected CovariantParsimonyPressure(bool deserializing) : base(deserializing) { }
     84    protected CovariantParsimonyPressure(CovariantParsimonyPressure original, Cloner clone) : base(original, clone) { }
    8385    public CovariantParsimonyPressure()
    8486      : base() {
     
    98100      Parameters.Add(new ValueLookupParameter<BoolValue>("InvertComplexityAdaption"));
    99101    }
     102
     103    public override IDeepCloneable Clone(Cloner cloner) {
     104      return new CovariantParsimonyPressure(this, cloner);
     105    }
     106
    100107
    101108    [StorableHook(Persistence.Default.CompositeSerializers.Storable.HookType.AfterDeserialization)]
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Operators/CovariantParsimonyPressureAdder.cs

    r5265 r5275  
    3232using HeuristicLab.Problems.DataAnalysis.Evaluators;
    3333using HeuristicLab.Analysis;
     34using HeuristicLab.Common;
    3435
    3536namespace HeuristicLab.Problems.DataAnalysis.Operators {
     
    6667
    6768    [StorableConstructor]
    68     public CovariantParsimonyPressureAdder(bool deserializing) : base(deserializing) { }
     69    protected CovariantParsimonyPressureAdder(bool deserializing) : base(deserializing) { }
     70    protected CovariantParsimonyPressureAdder(CovariantParsimonyPressureAdder original, Cloner cloner) : base(original, cloner) { }
    6971    public CovariantParsimonyPressureAdder()
    7072      : base() {
     
    7981      Parameters.Add(new ValueLookupParameter<BoolValue>("ApplyParsimonyPressure"));
    8082    }
    81 
     83    public override IDeepCloneable Clone(Cloner cloner) {
     84      return new CovariantParsimonyPressureAdder(this, cloner);
     85    }
    8286    [StorableHook(Persistence.Default.CompositeSerializers.Storable.HookType.AfterDeserialization)]
    8387    private void AfterDeserialization() {
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Operators/DynOpEqComparator.cs

    r5265 r5275  
    3030using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    3131using System.Collections.Generic;
     32using HeuristicLab.Common;
    3233
    3334namespace HeuristicLab.Problems.DataAnalysis.Operators {
     
    8182    }
    8283
     84    [StorableConstructor]
     85    protected DynOpEqComparator(bool deserializing) : base(deserializing) { }
     86    protected DynOpEqComparator(DynOpEqComparator original, Cloner cloner)
     87      : base(original, cloner) {
     88    }
    8389    public DynOpEqComparator()
    8490      : base() {
     
    100106    }
    101107
     108    public override IDeepCloneable Clone(Cloner cloner) {
     109      return new DynOpEqComparator(this, cloner);
     110    }
    102111    public override IOperation Apply() {
    103112      if (ResultParameter.ActualValue == null || ResultParameter.ActualValue.Value == true) {
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Operators/DynOpEqHistogramInitializer.cs

    r5265 r5275  
    3030using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    3131using System.Collections.Generic;
     32using HeuristicLab.Common;
    3233
    3334namespace HeuristicLab.Problems.DataAnalysis.Operators {
     
    6364    }
    6465
     66    [StorableConstructor]
     67    protected DynOpEqHistogramInitializer(bool deserializing) : base(deserializing) { }
     68    protected DynOpEqHistogramInitializer(DynOpEqHistogramInitializer original, Cloner cloner)
     69      : base(original, cloner) {
     70    }
    6571    public DynOpEqHistogramInitializer()
    6672      : base() {
     
    7581      Parameters.Add(new LookupParameter<BoolValue>("Maximization"));
    7682    }
    77 
     83    public override IDeepCloneable Clone(Cloner cloner) {
     84      return new DynOpEqHistogramInitializer(this, cloner);
     85    }
    7886    public override IOperation Apply() {
    7987      if (BinCapacityParameter.ActualValue == null) {
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Operators/DynamicDepthLimitComparator.cs

    r5265 r5275  
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     31using HeuristicLab.Common;
    3132
    3233namespace HeuristicLab.Problems.DataAnalysis.Operators {
     
    6566    }
    6667
     68    [StorableConstructor]
     69    protected DynamicDepthLimitComparator(bool deserializing) : base(deserializing) { }
     70    protected DynamicDepthLimitComparator(DynamicDepthLimitComparator original, Cloner cloner)
     71      : base(original, cloner) {
     72    }
     73
    6774    public DynamicDepthLimitComparator()
    6875      : base() {
     
    7784      Parameters.Add(new ValueParameter<DoubleValue>("cLower", "", new DoubleValue(0.03)));
    7885      Parameters.Add(new ValueParameter<DoubleValue>("cRaise", "", new DoubleValue(0.015)));
     86    }
     87
     88    public override IDeepCloneable Clone(Cloner cloner) {
     89      return new DynamicDepthLimitComparator(this, cloner);
    7990    }
    8091
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Operators/DynamicDepthLimitInitializer.cs

    r5265 r5275  
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     31using HeuristicLab.Common;
    3132
    3233namespace HeuristicLab.Problems.DataAnalysis.Operators {
     
    4142    }
    4243
     44    [StorableConstructor]
     45    protected DynamicDepthLimitInitializer(bool deserializing) : base(deserializing) { }
     46    protected DynamicDepthLimitInitializer(DynamicDepthLimitInitializer original, Cloner cloner)
     47      : base(original, cloner) {
     48    }
    4349    public DynamicDepthLimitInitializer()
    4450      : base() {
    4551      Parameters.Add(new ValueLookupParameter<IntValue>("DynamicDepthLimit", "The current depth limit."));
    4652      Parameters.Add(new ValueLookupParameter<IntValue>("InitialDepthLimit", "The initial depth limit."));
     53    }
     54    public override IDeepCloneable Clone(Cloner cloner) {
     55      return new DynamicDepthLimitInitializer(this, cloner);
    4756    }
    4857
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Operators/WeightedParentsQualityVarianceComparator.cs

    r5265 r5275  
    2828using HeuristicLab.Parameters;
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.DataAnalysis.Operators {
     
    6162    }
    6263
     64    [StorableConstructor]
     65    protected WeightedParentsQualityVarianceComparator(bool deserializing) : base(deserializing) { }
     66    protected WeightedParentsQualityVarianceComparator(WeightedParentsQualityVarianceComparator original, Cloner cloner)
     67      : base(original, cloner) {
     68    }
    6369    public WeightedParentsQualityVarianceComparator()
    6470      : base() {
     
    7581      Parameters.Add(new ScopeTreeLookupParameter<IntValue>("RightSideSamples", "The number of samples used to calculate the quality of the parent."));
    7682    }
    77 
     83    public override IDeepCloneable Clone(Cloner cloner) {
     84      return new WeightedParentsQualityVarianceComparator(this, cloner);
     85    }
    7886    public override IOperation Apply() {
    7987      double leftQuality = LeftSideParameter.ActualValue.Value;
     
    114122      double stat = (xmean - ymean) / Math.Sqrt(xvar / n + yvar / m);
    115123      double c = xvar / n / (xvar / n + yvar / m);
    116       double df = (n - 1) * (m - 1) / ((m - 1) * AP.Math.Sqr(c) + (n - 1) * (1 - AP.Math.Sqr(c)));
     124      double df = (n - 1) * (m - 1) / ((m - 1) * alglib.math.sqr(c) + (n - 1) * (1 - alglib.math.sqr(c)));
    117125      if ((double)(stat) > (double)(0))
    118         p = 1 - 0.5 * ibetaf.incompletebeta(df / 2, 0.5, df / (df + AP.Math.Sqr(stat)));
     126        p = 1 - 0.5 * alglib.ibetaf.incompletebeta(df / 2, 0.5, df / (df + alglib.math.sqr(stat)));
    119127      else
    120         p = 0.5 * ibetaf.incompletebeta(df / 2, 0.5, df / (df + AP.Math.Sqr(stat)));
     128        p = 0.5 * alglib.ibetaf.incompletebeta(df / 2, 0.5, df / (df + alglib.math.sqr(stat)));
    121129      double bothtails = 2 * Math.Min(p, 1 - p);
    122130      double lefttail = p;
Note: See TracChangeset for help on using the changeset viewer.