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/NeuralNetworkRegression.cs

    r15583 r15783  
    115115    public NeuralNetworkRegression()
    116116      : base() {
    117       var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { 
    118         (IntValue)new IntValue(0).AsReadOnly(), 
    119         (IntValue)new IntValue(1).AsReadOnly(), 
     117      var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] {
     118        (IntValue)new IntValue(0).AsReadOnly(),
     119        (IntValue)new IntValue(1).AsReadOnly(),
    120120        (IntValue)new IntValue(2).AsReadOnly() });
    121121      var selectedHiddenLayerValue = (from v in validHiddenLayerValues
     
    186186      IEnumerable<int> rows = problemData.TrainingIndices;
    187187      double[,] inputMatrix = dataset.ToArray(allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    188       if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     188      if (inputMatrix.ContainsNanInf())
    189189        throw new NotSupportedException("Neural network regression does not support NaN or infinity values in the input dataset.");
    190190
Note: See TracChangeset for help on using the changeset viewer.