Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/19/16 11:16:20 (8 years ago)
Author:
bburlacu
Message:

#2660: Include instances with no noise. Improve formatting of problem description.

Location:
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/VariableNetwork.cs

    r14185 r14260  
    9999        var datai = Enumerable.Range(0, TestPartitionEnd).Select(_ => nrand.NextDouble()).ToList();
    100100        inputVarNames.Add(new string[] { });
    101         description.Add("~ N(0, 1)");
     101        description.Add(" ~ N(0, 1)");
    102102        lvl0.Add(datai);
    103103      }
     
    112112        var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio)));
    113113        lvl1.Add(x.Select(t => t + noisePrng.NextDouble()).ToList());
    114 
     114        Array.Sort(selectedVarNames);
    115115        inputVarNames.Add(selectedVarNames);
    116116        var desc = string.Format("f({0})", string.Join(",", selectedVarNames));
     
    127127        var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio)));
    128128        lvl2.Add(x.Select(t => t + noisePrng.NextDouble()).ToList());
    129 
     129        Array.Sort(selectedVarNames);
    130130        inputVarNames.Add(selectedVarNames);
    131131        var desc = string.Format("f({0})", string.Join(",", selectedVarNames));
     
    142142        var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio)));
    143143        lvl3.Add(x.Select(t => t + noisePrng.NextDouble()).ToList());
    144 
     144        Array.Sort(selectedVarNames);
    145145        inputVarNames.Add(selectedVarNames);
    146146        var desc = string.Format("f({0})", string.Join(",", selectedVarNames));
    147147        description.Add(string.Format(" ~ N({0}, {1:N3})", desc, noisePrng.Sigma));
    148148      }
    149 
    150       networkDefinition = string.Join(Environment.NewLine, variableNames.Zip(description, (n, d) => n + d));
     149      networkDefinition = string.Join(Environment.NewLine, variableNames.Zip(description, (n, d) => n + d).OrderBy(x => x));
    151150      // for graphviz
    152151      networkDefinition += Environment.NewLine + "digraph G {";
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/VariableNetworkInstanceProvider.cs

    r14229 r14260  
    4949    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    5050      var numVariables = new int[] { 10, 20, 50, 100 };
    51       var noiseRatios = new double[] { 0.01, 0.05, 0.1 };
     51      var noiseRatios = new double[] { 0, 0.01, 0.05, 0.1 };
    5252      var rand = new MersenneTwister((uint)Seed); // use fixed seed for deterministic problem generation
    5353      return (from size in numVariables
Note: See TracChangeset for help on using the changeset viewer.