Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/04/12 11:28:24 (12 years ago)
Author:
mkommend
Message:

#1292: Corrected SpearmansRankCalculator.

File:
1 edited

Legend:

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

    r8689 r8728  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    2423using System.Linq;
     
    3029      double rs = double.NaN;
    3130      try {
    32         rs = alglib.basestat.spearmancorr2(originalValues.ToArray(), estimatedValues.ToArray(), originalValues.Count());
     31        var original = originalValues.ToArray();
     32        var estimated = estimatedValues.ToArray();
     33        rs = alglib.basestat.spearmancorr2(original, estimated, original.Length);
    3334        errorState = OnlineCalculatorError.None;
    3435      }
    35       catch (Exception ex) {
     36      catch (alglib.alglibexception) {
    3637        errorState = OnlineCalculatorError.InvalidValueAdded;
    3738      }
Note: See TracChangeset for help on using the changeset viewer.