Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (14 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.DataAnalysis

  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleEvaluator.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
    2425using HeuristicLab.Operators;
    2526using HeuristicLab.Parameters;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2628
    2729namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
     
    3234    public ILookupParameter<DoubleMatrix> ValuesParameter {
    3335      get { return (ILookupParameter<DoubleMatrix>)Parameters["Values"]; }
     36    }
     37    [StorableConstructor]
     38    protected SimpleEvaluator(bool deserializing) : base(deserializing) { }
     39    protected SimpleEvaluator(SimpleEvaluator original, Cloner cloner)
     40      : base(original, cloner) {
    3441    }
    3542    public SimpleEvaluator()
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMSEEvaluator.cs

    r4239 r4722  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Core;
    2627using HeuristicLab.Data;
    2728using HeuristicLab.Parameters;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2830
    2931namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
     
    3436    }
    3537
     38    [StorableConstructor]
     39    protected SimpleMSEEvaluator(bool deserializing) : base(deserializing) { }
     40    protected SimpleMSEEvaluator(SimpleMSEEvaluator original, Cloner cloner)
     41      : base(original, cloner) {
     42    }
     43    public override IDeepCloneable Clone(Cloner cloner) {
     44      return new SimpleMSEEvaluator(this, cloner);
     45    }
    3646    public SimpleMSEEvaluator() {
    3747      Parameters.Add(new LookupParameter<DoubleValue>("MeanSquaredError", "The mean squared error of estimated values."));
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMeanAbsolutePercentageErrorEvaluator.cs

    r4068 r4722  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Core;
    2627using HeuristicLab.Data;
    2728using HeuristicLab.Parameters;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2830
    2931namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
     
    3335    }
    3436
     37    [StorableConstructor]
     38    protected SimpleMeanAbsolutePercentageErrorEvaluator(bool deserializing) : base(deserializing) { }
     39    protected SimpleMeanAbsolutePercentageErrorEvaluator(SimpleMeanAbsolutePercentageErrorEvaluator original, Cloner cloner)
     40      : base(original, cloner) {
     41    }
    3542    public SimpleMeanAbsolutePercentageErrorEvaluator() {
    3643      Parameters.Add(new LookupParameter<PercentValue>("AverageRelativeError", "The average relative error of estimated values."));
     
    4350                      select values[i, ESTIMATION_INDEX];
    4451      AverageRelativeErrorParameter.ActualValue = new PercentValue(Calculate(original, estimated));
     52    }
     53
     54    public override IDeepCloneable Clone(Cloner cloner) {
     55      return new SimpleMeanAbsolutePercentageErrorEvaluator(this, cloner);
    4556    }
    4657
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.cs

    r4068 r4722  
    2727using HeuristicLab.Data;
    2828using HeuristicLab.Parameters;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2930
    3031namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
     
    3536    }
    3637
     38    [StorableConstructor]
     39    protected SimpleMeanAbsolutePercentageOfRangeErrorEvaluator(bool deserializing) : base(deserializing) { }
     40    protected SimpleMeanAbsolutePercentageOfRangeErrorEvaluator(SimpleMeanAbsolutePercentageOfRangeErrorEvaluator original, Cloner cloner)
     41      : base(original, cloner) {
     42    }
    3743    public SimpleMeanAbsolutePercentageOfRangeErrorEvaluator() {
    3844      Parameters.Add(new LookupParameter<PercentValue>("AveragePercentageOfRangeError", "The average relative (percentage of range) error of estimated values."));
     
    4551                      select values[i, ESTIMATION_INDEX];
    4652      AveragePercentageOfRangeErrorParameter.ActualValue = new PercentValue(Calculate(original, estimated));
     53    }
     54
     55    public override IDeepCloneable Clone(Cloner cloner) {
     56      return new SimpleMeanAbsolutePercentageOfRangeErrorEvaluator(this, cloner);
    4757    }
    4858
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleNMSEEvaluator.cs

    r4068 r4722  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Core;
    2627using HeuristicLab.Data;
    2728using HeuristicLab.Parameters;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2830
    2931namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
     
    3436    }
    3537
     38    [StorableConstructor]
     39    protected SimpleNMSEEvaluator(bool deserializing) : base(deserializing) { }
     40    protected SimpleNMSEEvaluator(SimpleNMSEEvaluator original, Cloner cloner)
     41      : base(original, cloner) {
     42    }
     43    public override IDeepCloneable Clone(Cloner cloner) {
     44      return new SimpleNMSEEvaluator(this, cloner);
     45    }
    3646    public SimpleNMSEEvaluator() {
    3747      Parameters.Add(new LookupParameter<DoubleValue>("NormalizedMeanSquaredError", "The normalized mean squared error (divided by variance) of estimated values."));
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleRSquaredEvaluator.cs

    r4068 r4722  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Core;
    2627using HeuristicLab.Data;
    2728using HeuristicLab.Parameters;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2830
    2931namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
     
    3234      get { return (ILookupParameter<DoubleValue>)Parameters["RSquared"]; }
    3335    }
    34 
     36    [StorableConstructor]
     37    protected SimpleRSquaredEvaluator(bool deserializing) : base(deserializing) { }
     38    protected SimpleRSquaredEvaluator(SimpleRSquaredEvaluator original, Cloner cloner)
     39      : base(original, cloner) {
     40    }
     41    public override IDeepCloneable Clone(Cloner cloner) {
     42      return new SimpleRSquaredEvaluator(this, cloner);
     43    }
    3544    public SimpleRSquaredEvaluator() {
    3645      Parameters.Add(new LookupParameter<DoubleValue>("RSquared", "The squared Pearson's Product Moment Correlation (R²) of estimated values and original values."));
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleVarianceAccountedForEvaluator.cs

    r4068 r4722  
    2727using HeuristicLab.Data;
    2828using HeuristicLab.Parameters;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2930
    3031namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
     
    4041    }
    4142
     43    [StorableConstructor]
     44    protected SimpleVarianceAccountedForEvaluator(bool deserializing) : base(deserializing) { }
     45    protected SimpleVarianceAccountedForEvaluator(SimpleVarianceAccountedForEvaluator original, Cloner cloner)
     46      : base(original, cloner) {
     47    }
     48    public override IDeepCloneable Clone(Cloner cloner) {
     49      return new SimpleVarianceAccountedForEvaluator(this, cloner);
     50    }
    4251    public SimpleVarianceAccountedForEvaluator() {
    4352      Parameters.Add(new LookupParameter<DoubleValue>("VarianceAccountedFor", "The variance of the original values accounted for by the estimated values (VAF(y,y') = 1 - var(y-y') / var(y) )."));
Note: See TracChangeset for help on using the changeset viewer.