Ignore:
Timestamp:
02/16/18 11:35:54 (22 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/NeuralNetwork/NeuralNetworkEnsembleRegression.cs

    r15583 r15783  
    125125    public NeuralNetworkEnsembleRegression()
    126126      : base() {
    127       var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { 
    128         (IntValue)new IntValue(0).AsReadOnly(), 
    129         (IntValue)new IntValue(1).AsReadOnly(), 
     127      var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] {
     128        (IntValue)new IntValue(0).AsReadOnly(),
     129        (IntValue)new IntValue(1).AsReadOnly(),
    130130        (IntValue)new IntValue(2).AsReadOnly() });
    131131      var selectedHiddenLayerValue = (from v in validHiddenLayerValues
     
    170170      IEnumerable<int> rows = problemData.TrainingIndices;
    171171      double[,] inputMatrix = dataset.ToArray(allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    172       if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     172      if (inputMatrix.ContainsNanInf())
    173173        throw new NotSupportedException("Neural network ensemble regression does not support NaN or infinity values in the input dataset.");
    174174
Note: See TracChangeset for help on using the changeset viewer.