Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/11/11 18:41:03 (14 years ago)
Author:
gkronber
Message:

#790 Fixed minor issues in LDA, LR, SVC and SVR to make sure everything works correctly in presence of NaN and infinity values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClustering.cs

    r5914 r6002  
    9292      int[] xyc;
    9393      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables, rows);
     94      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     95        throw new NotSupportedException("k-Means clustering does not support NaN or infinity values in the input dataset.");
     96
    9497      alglib.kmeansgenerate(inputMatrix, inputMatrix.GetLength(0), inputMatrix.GetLength(1), k, restarts + 1, out info, out centers, out xyc);
    9598      if (info != 1) throw new ArgumentException("Error in calculation of k-Means clustering solution");
Note: See TracChangeset for help on using the changeset viewer.