Changeset 8874 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs
- Timestamp:
- 11/07/12 13:44:33 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs
r8833 r8874 70 70 bw.CancelAsync(); 71 71 } 72 }73 74 private double[,] GetElementsOfCorrelation(double[,] corr, int frames) {75 double[,] elements = new double[corr.GetLength(0), frames + 1];76 for (int i = 0; i < corr.GetLength(0); i++) {77 for (int j = 0; j <= frames; j++) {78 elements[i, j] = corr[i, j];79 }80 }81 return elements;82 72 } 83 73 … … 204 194 205 195 private IEnumerable<double> GetRelevantValues(IDataAnalysisProblemData problemData, string partition, string variable) { 206 IEnumerable<double> var = problemData.Dataset.GetDoubleValues(variable);207 if (partition.Equals(FeatureCorrelationPartitions.TRAININGSAMPLES)) {208 var = var.Skip(problemData.TrainingPartition.Start).Take(problemData.TrainingPartition.End - problemData.TrainingPartition.Start);209 } else if (partition.Equals(FeatureCorrelationPartitions.TESTSAMPLES)) {210 var = var.Skip(problemData.TestPartition.Start).Take(problemData.TestPartition.End - problemData.TestPartition.Start);211 }196 IEnumerable<double> var; 197 if (partition.Equals(FeatureCorrelationPartitions.TRAININGSAMPLES)) 198 var = problemData.Dataset.GetDoubleValues(variable, problemData.TrainingIndices); 199 else if (partition.Equals(FeatureCorrelationPartitions.TESTSAMPLES)) 200 var = problemData.Dataset.GetDoubleValues(variable, problemData.TestIndices); 201 else var = problemData.Dataset.GetDoubleValues(variable); 212 202 return var; 213 203 } … … 216 206 BackgroundWorker worker = sender as BackgroundWorker; 217 207 if (!e.Cancelled && !worker.CancellationPending) { 218 if ( !(e.Error == null)) {208 if (e.Error != null) { 219 209 ErrorHandling.ShowErrorDialog(e.Error); 220 210 } else {
Note: See TracChangeset
for help on using the changeset viewer.