Changeset 14260 for trunk/sources
- Timestamp:
- 08/19/16 11:16:20 (8 years ago)
- 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 99 99 var datai = Enumerable.Range(0, TestPartitionEnd).Select(_ => nrand.NextDouble()).ToList(); 100 100 inputVarNames.Add(new string[] { }); 101 description.Add(" ~ N(0, 1)");101 description.Add(" ~ N(0, 1)"); 102 102 lvl0.Add(datai); 103 103 } … … 112 112 var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio))); 113 113 lvl1.Add(x.Select(t => t + noisePrng.NextDouble()).ToList()); 114 114 Array.Sort(selectedVarNames); 115 115 inputVarNames.Add(selectedVarNames); 116 116 var desc = string.Format("f({0})", string.Join(",", selectedVarNames)); … … 127 127 var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio))); 128 128 lvl2.Add(x.Select(t => t + noisePrng.NextDouble()).ToList()); 129 129 Array.Sort(selectedVarNames); 130 130 inputVarNames.Add(selectedVarNames); 131 131 var desc = string.Format("f({0})", string.Join(",", selectedVarNames)); … … 142 142 var noisePrng = new NormalDistributedRandom(random, 0, sigma * Math.Sqrt(noiseRatio / (1.0 - noiseRatio))); 143 143 lvl3.Add(x.Select(t => t + noisePrng.NextDouble()).ToList()); 144 144 Array.Sort(selectedVarNames); 145 145 inputVarNames.Add(selectedVarNames); 146 146 var desc = string.Format("f({0})", string.Join(",", selectedVarNames)); 147 147 description.Add(string.Format(" ~ N({0}, {1:N3})", desc, noisePrng.Sigma)); 148 148 } 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)); 151 150 // for graphviz 152 151 networkDefinition += Environment.NewLine + "digraph G {"; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/VariableNetworkInstanceProvider.cs
r14229 r14260 49 49 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 50 50 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 }; 52 52 var rand = new MersenneTwister((uint)Seed); // use fixed seed for deterministic problem generation 53 53 return (from size in numVariables
Note: See TracChangeset
for help on using the changeset viewer.