Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/20/18 09:09:32 (7 years ago)
Author:
gkronber
Message:

#2902 merged r15783 and r15786 from trunk to stable

Location:
stable
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Algorithms.DataAnalysis

  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4

  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs

    r15584 r15788  
    115115    public NeuralNetworkClassification()
    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
     
    185185      IEnumerable<int> rows = problemData.TrainingIndices;
    186186      double[,] inputMatrix = dataset.ToArray(allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    187       if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     187      if (inputMatrix.ContainsNanOrInfinity())
    188188        throw new NotSupportedException("Neural network classification does not support NaN or infinity values in the input dataset.");
    189189
  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs

    r15584 r15788  
    171171      IEnumerable<int> rows = problemData.TrainingIndices;
    172172      double[,] inputMatrix = dataset.ToArray(allowedInputVariables.Concat(new string[] { targetVariable }), rows);
    173       if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
     173      if (inputMatrix.ContainsNanOrInfinity())
    174174        throw new NotSupportedException("Neural network ensemble classification does not support NaN or infinity values in the input dataset.");
    175175
  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs

    r15584 r15788  
    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.ContainsNanOrInfinity())
    173173        throw new NotSupportedException("Neural network ensemble regression does not support NaN or infinity values in the input dataset.");
    174174
  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs

    r15584 r15788  
    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.ContainsNanOrInfinity())
    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.