- Timestamp:
- 10/23/12 10:07:48 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/HoeffdingsDependenceCalculator.cs
r8542 r8833 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Data; 25 26 26 27 namespace HeuristicLab.Problems.DataAnalysis { 27 public class HoeffdingsDependenceCalculator {28 public class HoeffdingsDependenceCalculator : IDependencyCalculator { 28 29 29 public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) { 30 public DoubleRange Interval { get { return new DoubleRange(1.0, -0.5); } } 31 32 public string Name { get { return "Hoeffdings Dependence"; } } 33 34 public double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) { 35 return HoeffdingsDependenceCalculator.CalculateHoeffdings(originalValues, estimatedValues, out errorState); 36 } 37 38 public static double CalculateHoeffdings(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) { 30 39 double d = HoeffD(originalValues, estimatedValues, out errorState); 31 40 if (errorState != OnlineCalculatorError.None) return double.NaN; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/SpearmansRankCorrelationCoefficientCalculator.cs
r8728 r8833 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Data; 24 25 25 26 namespace HeuristicLab.Problems.DataAnalysis { 26 public class SpearmansRankCorrelationCoefficientCalculator {27 public class SpearmansRankCorrelationCoefficientCalculator : IDependencyCalculator { 27 28 28 public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) { 29 public DoubleRange Interval { get { return new DoubleRange(1.0, -1.0); } } 30 31 public string Name { get { return "Spearmans Rank"; } } 32 33 public double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) { 34 return SpearmansRankCorrelationCoefficientCalculator.CalculateSpearmansRank(originalValues, estimatedValues, out errorState); 35 } 36 37 public static double CalculateSpearmansRank(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) { 29 38 double rs = double.NaN; 30 39 try {
Note: See TracChangeset
for help on using the changeset viewer.