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/FeynmanBonus5.cs

    r17966 r17973  
    3737
    3838    protected override string[] VariableNames {
    39       get { return new[] {"c", "v", "theta2", noiseRatio == null ? "theta1" : "theta1_noise"}; }
     39      get { return noiseRatio == null ? new[] { "c", "v", "theta2", "theta1" } : new[] { "c", "v", "theta2", "theta1", "theta1_noise" }; }
    4040    }
    4141
     
    6969      }
    7070
    71       if (noiseRatio != null) {
    72         var theta1_noise = new List<double>();
    73         var sigma_noise  = (double) Math.Sqrt(noiseRatio.Value) * theta1.StandardDeviationPop();
    74         theta1_noise.AddRange(theta1.Select(md => md + NormalDistributedRandomPolar.NextDouble(rand, 0, sigma_noise)));
    75         data.Remove(theta1);
    76         data.Add(theta1_noise);
    77       }
     71      var targetNoise = GetNoisyTarget(theta1, rand);
     72      if (targetNoise != null) data.Add(targetNoise);
    7873
    7974      return data;
Note: See TracChangeset for help on using the changeset viewer.