Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/21 14:29:30 (3 years ago)
Author:
chaider
Message:

#3075

  • Added target without noise to noisy instances
  • Moved noise calculation to descriptor
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus4.cs

    r17966 r17973  
    3737
    3838    protected override string[] VariableNames {
    39       get { return new[] {"G", "c", "m1", "m2", "r", noiseRatio == null ? "Pwr" : "Pwr_noise"}; }
     39      get { return noiseRatio == null ? new[] { "G", "c", "m1", "m2", "r", "Pwr" } : new[] { "G", "c", "m1", "m2", "r", "Pwr", "Pwr_noise" }; }
    4040    }
    4141
     
    7474      }
    7575
    76       if (noiseRatio != null) {
    77         var Pwr_noise   = new List<double>();
    78         var sigma_noise = (double) Math.Sqrt(noiseRatio.Value) * Pwr.StandardDeviationPop();
    79         Pwr_noise.AddRange(Pwr.Select(md => md + NormalDistributedRandomPolar.NextDouble(rand, 0, sigma_noise)));
    80         data.Remove(Pwr);
    81         data.Add(Pwr_noise);
    82       }
     76      var targetNoise = GetNoisyTarget(Pwr, rand);
     77      if (targetNoise != null) data.Add(targetNoise);
    8378
    8479      return data;
Note: See TracChangeset for help on using the changeset viewer.