Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/27/16 15:28:26 (8 years ago)
Author:
mkommend
Message:

#2619:

  • Refactored and separated the different feature correlation calculations.
  • Added a checkbox to ignore missing values in the calculation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/PearsonsRDependenceCalculator.cs

    r12492 r13938  
    3535      return OnlinePearsonsRCalculator.Calculate(originalValues, estimatedValues, out errorState);
    3636    }
     37
     38    public double Calculate(IEnumerable<Tuple<double, double>> values, out OnlineCalculatorError errorState) {
     39      var calculator = new OnlinePearsonsRCalculator();
     40      foreach (var tuple in values) {
     41        calculator.Add(tuple.Item1, tuple.Item2);
     42        if (calculator.ErrorState != OnlineCalculatorError.None) break;
     43      }
     44      errorState = calculator.ErrorState;
     45      return calculator.R;
     46    }
    3747  }
    3848}
Note: See TracChangeset for help on using the changeset viewer.