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

    r17966 r17973  
    3434
    3535    protected override string TargetVariable { get { return noiseRatio == null ? "L" : "L_noise"; } }
    36     protected override string[] VariableNames { get { return new[] {"n", "h", noiseRatio == null ? "L" : "L_noise"}; } }
     36
     37    protected override string[] VariableNames {
     38      get { return noiseRatio == null ? new[] { "n", "h", "L" } : new[] { "n", "h", "L", "L_noise" }; }
     39    }
    3740    protected override string[] AllowedInputVariables { get { return new[] {"n", "h"}; } }
    3841
     
    6265      }
    6366
    64       if (noiseRatio != null) {
    65         var L_noise     = new List<double>();
    66         var sigma_noise = (double) Math.Sqrt(noiseRatio.Value) * L.StandardDeviationPop();
    67         L_noise.AddRange(L.Select(md => md + NormalDistributedRandomPolar.NextDouble(rand, 0, sigma_noise)));
    68         data.Remove(L);
    69         data.Add(L_noise);
    70       }
     67      var targetNoise = GetNoisyTarget(L, rand);
     68      if (targetNoise != null) data.Add(targetNoise);
    7169
    7270      return data;
Note: See TracChangeset for help on using the changeset viewer.