Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/23/12 10:07:48 (12 years ago)
Author:
sforsten
Message:

#1292:

  • removed combo box in TimeframeCorrelationView and added a textbox instead
  • caches are directly in (Timeframe-)FeatureCorrelationView
  • caches use Tuple<> instead of nested dictionaries
  • a control EnhancedStringConvertibleMatrix inherits from StringConvertibleMatrixView to reduce code duplication
  • add interface IDependencyCalculator to several calculators
  • fixed bug: a previous started calculation is cancelled, if a new calculation shall be started and the values are already in the cache
  • fixed bug: if the content is changed, the calculation is cancelled

HeatMap is still used for the dependency representation, because a class is needed which implements IStringConvertibleMatrix and it has a maximum and minimum value.

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  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Data;
    2526
    2627namespace HeuristicLab.Problems.DataAnalysis {
    27   public class HoeffdingsDependenceCalculator {
     28  public class HoeffdingsDependenceCalculator : IDependencyCalculator {
    2829
    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) {
    3039      double d = HoeffD(originalValues, estimatedValues, out errorState);
    3140      if (errorState != OnlineCalculatorError.None) return double.NaN;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/SpearmansRankCorrelationCoefficientCalculator.cs

    r8728 r8833  
    2222using System.Collections.Generic;
    2323using System.Linq;
     24using HeuristicLab.Data;
    2425
    2526namespace HeuristicLab.Problems.DataAnalysis {
    26   public class SpearmansRankCorrelationCoefficientCalculator {
     27  public class SpearmansRankCorrelationCoefficientCalculator : IDependencyCalculator {
    2728
    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) {
    2938      double rs = double.NaN;
    3039      try {
Note: See TracChangeset for help on using the changeset viewer.