- Timestamp:
- 05/04/17 17:19:35 (7 years ago)
- Location:
- branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/FeatureSelection/FeatureSelection.cs
r14185 r14927 48 48 + "Where is the S is a N x d matrix containing the selected columns from N x k the matrix of all features X" + Environment.NewLine 49 49 + "For each feature the probability that it is selected is " + selectionProbability + "%" + Environment.NewLine 50 + "X(i,j) ~ N(0, 1) iid, w(i) ~ U(0, 10) iid, n ~ N(0, sigma(w*S) * SQRT(" + noiseRatio / (1 - noiseRatio) 50 + "X(i,j) ~ N(0, 1) iid, w(i) ~ U(0, 10) iid, n ~ N(0, sigma(w*S) * SQRT(" + noiseRatio / (1 - noiseRatio) + "))" + Environment.NewLine 51 51 + "The noise level is " + noiseRatio + " * sigma, thus an optimal model has R² = " 52 52 + Math.Round(optimalRSquared, 2) + " (or equivalently: NMSE = " + noiseRatio + ")" + Environment.NewLine -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/FeatureSelection/FeatureSelectionRegressionProblemData.cs
r14185 r14927 26 26 using HeuristicLab.Data; 27 27 using HeuristicLab.Parameters; 28 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;28 using HeuristicLab.Persistence; 29 29 using HeuristicLab.Problems.DataAnalysis; 30 30 31 31 namespace HeuristicLab.Problems.Instances.DataAnalysis { 32 [Storable Class]32 [StorableType("f9a18311-052d-483d-a634-2bc425576b4f")] 33 33 public class FeatureSelectionRegressionProblemData : RegressionProblemData { 34 34 private const string SelectedFeaturesParameterName = "SelectedFeatures"; -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFifteen.cs
r14229 r14927 64 64 65 65 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 66 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 66 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 67 67 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper) 68 68 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionNine.cs
r14229 r14927 65 65 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper) 66 66 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper) 67 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 67 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 68 68 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 69 69 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionSix.cs
r14229 r14927 63 63 64 64 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper) 65 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());66 65 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 67 66 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 68 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 67 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 68 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList()); 69 69 70 70 double x0; -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/MibaFriction/CF1.cs
r14853 r14927 33 33 protected override string TargetVariable { get { return "Cf1"; } } 34 34 protected override string[] VariableNames { 35 get { return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Cf1" 36 }; } 35 get { 36 return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Cf1" 37 }; 38 } 37 39 } 38 40 39 41 protected override string[] AllowedInputVariables { 40 get { return new string[] { "Material_Cat", 42 get { 43 return new string[] { "Material_Cat", 41 44 "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", 42 45 "Material", "Grooving", "Oil", 43 "x17", "x20", "x22" }; } 46 "x17", "x20", "x22" }; 47 } 44 48 } 45 49 protected override int TrainingPartitionStart { get { return 0; } } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/MibaFriction/CF2.cs
r14853 r14927 33 33 protected override string TargetVariable { get { return "Cf2"; } } 34 34 protected override string[] VariableNames { 35 get { return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Cf2" 35 get { 36 return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Cf2" 36 37 }; 37 38 } … … 39 40 40 41 protected override string[] AllowedInputVariables { 41 get { return new string[] { "Material_Cat", 42 get { 43 return new string[] { "Material_Cat", 42 44 "Source1", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", 43 45 "Material", "Grooving", "Oil", 44 "x17", "x18", "x19", "x20", "x21", "x22" }; } 46 "x17", "x18", "x19", "x20", "x21", "x22" }; 47 } 45 48 } 46 49 protected override int TrainingPartitionStart { get { return 0; } } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/MibaFriction/CF3.cs
r14853 r14927 33 33 protected override string TargetVariable { get { return "Cf3"; } } 34 34 protected override string[] VariableNames { 35 get { return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Cf3" 35 get { 36 return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Cf3" 36 37 }; 37 38 } … … 39 40 40 41 protected override string[] AllowedInputVariables { 41 get { return new string[] { "Material_Cat", 42 get { 43 return new string[] { "Material_Cat", 42 44 "Source1", "x1", "x2", "x3", "x4", "x5", "x6", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", 43 45 "Material", "Grooving", "Oil", 44 "x17", "x22" }; } 46 "x17", "x22" }; 47 } 45 48 } 46 49 protected override int TrainingPartitionStart { get { return 0; } } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/MibaFriction/CF4.cs
r14853 r14927 33 33 protected override string TargetVariable { get { return "Cf4"; } } 34 34 protected override string[] VariableNames { 35 get { return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Cf4" 35 get { 36 return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Cf4" 36 37 }; 37 38 } … … 39 40 40 41 protected override string[] AllowedInputVariables { 41 get { return new string[] { "Material_Cat", 42 get { 43 return new string[] { "Material_Cat", 42 44 "x1", "x2", "x3", "x4", "x5", "x6", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", 43 45 "Material", "Grooving", "Oil", 44 "x17", "x22" }; } 46 "x17", "x22" }; 47 } 45 48 } 46 49 protected override int TrainingPartitionStart { get { return 0; } } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/MibaFriction/NvhRating.cs
r14853 r14927 33 33 protected override string TargetVariable { get { return "NVH_Rating"; } } 34 34 protected override string[] VariableNames { 35 get { return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "NVH_Rating" 35 get { 36 return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "NVH_Rating" 36 37 }; 37 38 } … … 39 40 40 41 protected override string[] AllowedInputVariables { 41 get { return new string[] { "Material_Cat", 42 get { 43 return new string[] { "Material_Cat", 42 44 "x1", "x2", "x3", "x4", "x5", "x6", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", 43 45 "Material", "Grooving", "Oil", 44 "x17", "x18", "x19", "x21", "x22" }; } 46 "x17", "x18", "x19", "x21", "x22" }; 47 } 45 48 } 46 49 protected override int TrainingPartitionStart { get { return 0; } } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/MibaFriction/Temp1.cs
r14853 r14927 33 33 protected override string TargetVariable { get { return "Temp1"; } } 34 34 protected override string[] VariableNames { 35 get { return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Temp1" 35 get { 36 return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Temp1" 36 37 }; 37 38 } … … 39 40 40 41 protected override string[] AllowedInputVariables { 41 get { return new string[] { "Material_Cat", 42 get { 43 return new string[] { "Material_Cat", 42 44 "x1", "x2", "x3", "x4", "x5", "x6", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", 43 45 "Material", "Grooving", "Oil", 44 "x17", "x22" }; } 46 "x17", "x22" }; 47 } 45 48 } 46 49 protected override int TrainingPartitionStart { get { return 0; } } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/MibaFriction/Temp2.cs
r14853 r14927 33 33 protected override string TargetVariable { get { return "Temp2"; } } 34 34 protected override string[] VariableNames { 35 get { return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Temp2" 35 get { 36 return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Temp2" 36 37 }; 37 38 } … … 39 40 40 41 protected override string[] AllowedInputVariables { 41 get { return new string[] { "Material_Cat", 42 get { 43 return new string[] { "Material_Cat", 42 44 "x1", "x2", "x3", "x4", "x5", "x6", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", 43 45 "Material", "Grooving", "Oil", 44 "x17", "x22" }; } 46 "x17", "x22" }; 47 } 45 48 } 46 49 protected override int TrainingPartitionStart { get { return 0; } } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/MibaFriction/Wear1.cs
r14853 r14927 33 33 protected override string TargetVariable { get { return "Wear1"; } } 34 34 protected override string[] VariableNames { 35 get { return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Wear1" 35 get { 36 return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Wear1" 36 37 }; 37 38 } … … 39 40 40 41 protected override string[] AllowedInputVariables { 41 get { return new string[] { "Material_Cat", 42 get { 43 return new string[] { "Material_Cat", 42 44 "Source1", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", 43 45 "Material", "Grooving", "Oil", 44 "x17", "x18", "x19", "x20", "x21", "x22" }; } 46 "x17", "x18", "x19", "x20", "x21", "x22" }; 47 } 45 48 } 46 49 protected override int TrainingPartitionStart { get { return 0; } } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/MibaFriction/Wear2.cs
r14853 r14927 33 33 protected override string TargetVariable { get { return "Wear2"; } } 34 34 protected override string[] VariableNames { 35 get { return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Wear2" 35 get { 36 return new string[] { "Partition", "Source1", "Source2", "x1", "Material_Cat", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "Material", "Grooving", "Oil", "x17", "x18", "x19", "x20", "x21", "x22", "Wear2" 36 37 }; 37 38 } … … 39 40 40 41 protected override string[] AllowedInputVariables { 41 get { return new string[] { "Material_Cat", 42 get { 43 return new string[] { "Material_Cat", 42 44 "Source1", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", 43 45 "Material", "Grooving", "Oil", 44 "x17", "x18", "x19", "x20", "x21", "x22" }; } 46 "x17", "x18", "x19", "x20", "x21", "x22" }; 47 } 45 48 } 46 49 protected override int TrainingPartitionStart { get { return 0; } } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTwo.cs
r14229 r14927 59 59 for (int i = 0; i < data[0].Count; i++) { 60 60 x = data[0][i]; 61 results.Add(Math.Pow(x, 4) + Math.Pow(x, 3) + x *x + x);61 results.Add(Math.Pow(x, 4) + Math.Pow(x, 3) + x * x + x); 62 62 } 63 63 data.Add(results); -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/GaussianProcessVariableNetwork.cs
r14630 r14927 90 90 var changedL = new double[l.Length]; 91 91 var relevance = new double[l.Length]; 92 for (int i = 0; i < l.Length; i++) {92 for (int i = 0; i < l.Length; i++) { 93 93 Array.Copy(l, changedL, changedL.Length); 94 94 changedL[i] = double.MaxValue; … … 100 100 OnlineCalculatorError error; 101 101 var mse = OnlineMeanSquaredErrorCalculator.Calculate(y, yChanged, out error); 102 if (error != OnlineCalculatorError.None) mse = double.MaxValue;102 if (error != OnlineCalculatorError.None) mse = double.MaxValue; 103 103 relevance[i] = mse; 104 104 } 105 105 // scale so that max relevance is 1.0 106 106 var maxRel = relevance.Max(); 107 for (int i = 0; i < relevance.Length; i++) relevance[i] /= maxRel;107 for (int i = 0; i < relevance.Length; i++) relevance[i] /= maxRel; 108 108 return relevance; 109 109 } … … 112 112 int nRows = xs.First().Count; 113 113 double[,] K = new double[nRows, nRows]; 114 for (int r = 0; r < nRows; r++) {114 for (int r = 0; r < nRows; r++) { 115 115 double[] xi = xs.Select(x => x[r]).ToArray(); 116 for (int c = 0; c <= r; c++) {116 for (int c = 0; c <= r; c++) { 117 117 double[] xj = xs.Select(x => x[c]).ToArray(); 118 118 double dSqr = xi.Zip(xj, (xik, xjk) => (xik - xjk)) … … 124 124 } 125 125 // add a small diagonal matrix for numeric stability 126 for (int i = 0; i < nRows; i++) {126 for (int i = 0; i < nRows; i++) { 127 127 K[i, i] += 1.0E-7; 128 128 } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/LinearVariableNetwork.cs
r14630 r14927 75 75 int nRows = xs.First().Count; 76 76 var y = new double[nRows]; 77 for (int row = 0; row < nRows; row++) {77 for (int row = 0; row < nRows; row++) { 78 78 y[row] = xs.Select(xi => xi[row]).Zip(c, (xij, cj) => xij * cj).Sum(); 79 79 y[row] /= c.Length; … … 90 90 var changedL = new double[l.Length]; 91 91 var relevance = new double[l.Length]; 92 for (int i = 0; i < l.Length; i++) {92 for (int i = 0; i < l.Length; i++) { 93 93 Array.Copy(l, changedL, changedL.Length); 94 94 changedL[i] = 0.0; … … 98 98 OnlineCalculatorError error; 99 99 var mse = OnlineMeanSquaredErrorCalculator.Calculate(y, yChanged, out error); 100 if (error != OnlineCalculatorError.None) mse = double.MaxValue;100 if (error != OnlineCalculatorError.None) mse = double.MaxValue; 101 101 relevance[i] = mse; 102 102 } 103 103 // scale so that max relevance is 1.0 104 104 var maxRel = relevance.Max(); 105 for (int i = 0; i < relevance.Length; i++) relevance[i] /= maxRel;105 for (int i = 0; i < relevance.Length; i++) relevance[i] /= maxRel; 106 106 return relevance; 107 107 } -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/VariableNetwork.cs
r14630 r14927 100 100 101 101 var nrand = new NormalDistributedRandom(random, 0, 1); 102 for (int c = 0; c < numLvl0; c++) {102 for (int c = 0; c < numLvl0; c++) { 103 103 inputVarNames.Add(new string[] { }); 104 104 relevances.Add(new double[] { }); … … 108 108 var sigma = x.StandardDeviationPop(); 109 109 var mean = x.Average(); 110 for (int i = 0; i < x.Count; i++) x[i] = (x[i] - mean) / sigma;110 for (int i = 0; i < x.Count; i++) x[i] = (x[i] - mean) / sigma; 111 111 var noisePrng = new NormalDistributedRandom(random, 0, Math.Sqrt(noiseRatio / (1.0 - noiseRatio))); 112 112 lvl0.Add(x.Select(t => t + noisePrng.NextDouble()).ToList()); … … 126 126 127 127 this.variableRelevances.Clear(); 128 for (int i = 0; i < variableNames.Length; i++) {128 for (int i = 0; i < variableNames.Length; i++) { 129 129 var targetVarName = variableNames[i]; 130 130 var targetRelevantInputs = … … 137 137 // for graphviz 138 138 networkDefinition += Environment.NewLine + "digraph G {"; 139 for (int i = 0; i < variableNames.Length; i++) {139 for (int i = 0; i < variableNames.Length; i++) { 140 140 var name = variableNames[i]; 141 141 var selectedVarNames = inputVarNames[i]; 142 142 var selectedRelevances = relevances[i]; 143 for (int j = 0; j < selectedVarNames.Length; j++) {143 for (int j = 0; j < selectedVarNames.Length; j++) { 144 144 var selectedVarName = selectedVarNames[j]; 145 145 var selectedRelevance = selectedRelevances[j]; … … 159 159 private List<List<double>> CreateVariables(List<List<double>> allowedInputs, int numVars, List<string[]> inputVarNames, List<string> description, List<double[]> relevances) { 160 160 var newVariables = new List<List<double>>(); 161 for (int c = 0; c < numVars; c++) {161 for (int c = 0; c < numVars; c++) { 162 162 string[] selectedVarNames; 163 163 double[] relevance; … … 166 166 var sigma = x.StandardDeviation(); 167 167 var mean = x.Average(); 168 for (int i = 0; i < x.Length; i++) x[i] = (x[i] - mean) / sigma;168 for (int i = 0; i < x.Length; i++) x[i] = (x[i] - mean) / sigma; 169 169 170 170 var noisePrng = new NormalDistributedRandom(random, 0, Math.Sqrt(noiseRatio / (1.0 - noiseRatio))); -
branches/PersistenceReintegration/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RationalPolynomialThreeDimensional.cs
r14229 r14927 63 63 data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), n, 0.05, 2).ToList()); 64 64 65 List<List<double>> testData = new List<List<double>>() { 66 SequenceGenerator.GenerateSteps(-0.05m, 2.05m, 0.15m).Select(v => (double)v).ToList(), 65 List<List<double>> testData = new List<List<double>>() { 66 SequenceGenerator.GenerateSteps(-0.05m, 2.05m, 0.15m).Select(v => (double)v).ToList(), 67 67 SequenceGenerator.GenerateSteps( 0.95m, 2.05m, 0.1m).Select(v => (double)v).ToList(), 68 68 SequenceGenerator.GenerateSteps(-0.05m, 2.05m, 0.15m).Select(v => (double)v).ToList()
Note: See TracChangeset
for help on using the changeset viewer.