Ignore:
Timestamp:
02/16/18 11:35:54 (19 months ago)
Author:
fholzing
Message:

#2902: Changed from Cast to Iterator and adapted all occurrences.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs

    r15583 r15783  
    310310    public static RandomForestModel CreateClassificationModel(IClassificationProblemData problemData, int nTrees, double r, double m, int seed,
    311311      out double rmsError, out double outOfBagRmsError, out double relClassificationError, out double outOfBagRelClassificationError) {
    312       return CreateClassificationModel(problemData, problemData.TrainingIndices, nTrees, r, m, seed, 
     312      return CreateClassificationModel(problemData, problemData.TrainingIndices, nTrees, r, m, seed,
    313313        out rmsError, out outOfBagRmsError, out relClassificationError, out outOfBagRelClassificationError);
    314314    }
     
    370370
    371371    private static void AssertInputMatrix(double[,] inputMatrix) {
    372       if (inputMatrix.Cast<double>().Any(x => Double.IsNaN(x) || Double.IsInfinity(x)))
     372      if (inputMatrix.ContainsNanInf())
    373373        throw new NotSupportedException("Random forest modeling does not support NaN or infinity values in the input dataset.");
    374374    }
Note: See TracChangeset for help on using the changeset viewer.