Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/11/11 18:41:03 (13 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/Linear/LinearDiscriminantAnalysis.cs

    r5809 r6002  
    7373      int nClasses = problemData.ClassNames.Count();
    7474      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
     75      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     76        throw new NotSupportedException("Linear discriminant analysis does not support NaN or infinity values in the input dataset.");
    7577
    7678      // change class values into class index
Note: See TracChangeset for help on using the changeset viewer.