Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/24/12 18:48:16 (12 years ago)
Author:
sforsten
Message:

#1292:

  • NaN values are used, if the calculation is invalid (e.g. missing values, infinity etc.)
  • Variables can now be filtered. Initially allowed input variables and target variable are shown, but with a right click a dialog can be opened to select variables, which shall be shown
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation/FeatureCorrelationCalculator.cs

    r8578 r8689  
    111111
    112112      IList<string> doubleVariableNames = dataset.DoubleVariables.ToList();
    113       OnlineCalculatorError error;
     113      OnlineCalculatorError error = OnlineCalculatorError.None;
    114114      int length = doubleVariableNames.Count;
    115115      double[,] elements = new double[length, length];
     
    124124            return;
    125125          }
    126 
    127126          IEnumerable<double> var1 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
    128127          IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[j]);
     
    130129          elements[i, j] = CalculateElementWithCalculator(calc, var1, var2, out error);
    131130
     131          if (!error.Equals(OnlineCalculatorError.None)) {
     132            elements[i, j] = double.NaN;
     133          }
    132134          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           }
    137135          worker.ReportProgress((int)Math.Round((((Math.Pow(i, 2) + i) / 2 + j + 1.0) / calculations) * 100));
    138136        }
     
    153151
    154152      IList<string> doubleVariableNames = dataset.DoubleVariables.ToList();
    155       OnlineCalculatorError error;
     153      OnlineCalculatorError error = OnlineCalculatorError.None;
    156154      int length = doubleVariableNames.Count;
    157155      double[,] elements = new double[length, frames + 1];
     
    186184
    187185          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;
    190187          }
    191188          worker.ReportProgress((int)((100.0 / calculations) * (i * (frames + 1) + j + 1)));
Note: See TracChangeset for help on using the changeset viewer.