Changeset 8689 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation
- Timestamp:
- 09/24/12 18:48:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation/FeatureCorrelationCalculator.cs
r8578 r8689 111 111 112 112 IList<string> doubleVariableNames = dataset.DoubleVariables.ToList(); 113 OnlineCalculatorError error ;113 OnlineCalculatorError error = OnlineCalculatorError.None; 114 114 int length = doubleVariableNames.Count; 115 115 double[,] elements = new double[length, length]; … … 124 124 return; 125 125 } 126 127 126 IEnumerable<double> var1 = GetRelevantValues(problemData, partition, doubleVariableNames[i]); 128 127 IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[j]); … … 130 129 elements[i, j] = CalculateElementWithCalculator(calc, var1, var2, out error); 131 130 131 if (!error.Equals(OnlineCalculatorError.None)) { 132 elements[i, j] = double.NaN; 133 } 132 134 elements[j, i] = elements[i, j]; 133 if (!error.Equals(OnlineCalculatorError.None)) {134 worker.ReportProgress(100);135 throw new ArgumentException("Calculator returned " + error + Environment.NewLine + "Maybe try another calculator.");136 }137 135 worker.ReportProgress((int)Math.Round((((Math.Pow(i, 2) + i) / 2 + j + 1.0) / calculations) * 100)); 138 136 } … … 153 151 154 152 IList<string> doubleVariableNames = dataset.DoubleVariables.ToList(); 155 OnlineCalculatorError error ;153 OnlineCalculatorError error = OnlineCalculatorError.None; 156 154 int length = doubleVariableNames.Count; 157 155 double[,] elements = new double[length, frames + 1]; … … 186 184 187 185 if (!error.Equals(OnlineCalculatorError.None)) { 188 worker.ReportProgress(100); 189 throw new ArgumentException("Calculator returned " + error + Environment.NewLine + "Maybe try another calculator."); 186 elements[i, j] = double.NaN; 190 187 } 191 188 worker.ReportProgress((int)((100.0 / calculations) * (i * (frames + 1) + j + 1)));
Note: See TracChangeset
for help on using the changeset viewer.