Changeset 15786 for trunk/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 02/20/18 08:02:17 (7 years ago)
- Location:
- trunk/HeuristicLab.Algorithms.DataAnalysis/3.4
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/DoubleArrayExtensions.cs
r15783 r15786 1 1 namespace HeuristicLab.Algorithms.DataAnalysis { 2 2 public static class DoubleArrayExtensions { 3 public static bool ContainsNan Inf(this double[,] array) {3 public static bool ContainsNanOrInfinity(this double[,] array) { 4 4 foreach (var entry in array) { 5 5 if (double.IsNaN(entry) || double.IsInfinity(entry)) { -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs
r15783 r15786 80 80 inputMatrix = factorMatrix.HorzCat(inputMatrix); 81 81 82 if (inputMatrix.ContainsNan Inf())82 if (inputMatrix.ContainsNanOrInfinity()) 83 83 throw new NotSupportedException("Linear discriminant analysis does not support NaN or infinity values in the input dataset."); 84 84 -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
r15783 r15786 80 80 var inputMatrix = binaryMatrix.HorzCat(doubleVarMatrix); 81 81 82 if (inputMatrix.ContainsNan Inf())82 if (inputMatrix.ContainsNanOrInfinity()) 83 83 throw new NotSupportedException("Linear regression does not support NaN or infinity values in the input dataset."); 84 84 -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs
r15783 r15786 78 78 inputMatrix = factorMatrix.HorzCat(inputMatrix); 79 79 80 if (inputMatrix.ContainsNan Inf())80 if (inputMatrix.ContainsNanOrInfinity()) 81 81 throw new NotSupportedException("Multinomial logit classification does not support NaN or infinity values in the input dataset."); 82 82 -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
r15783 r15786 142 142 } 143 143 144 if (inputMatrix.ContainsNan Inf())144 if (inputMatrix.ContainsNanOrInfinity()) 145 145 throw new NotSupportedException( 146 146 "Nearest neighbour model does not support NaN or infinity values in the input dataset."); -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs
r15783 r15786 185 185 IEnumerable<int> rows = problemData.TrainingIndices; 186 186 double[,] inputMatrix = dataset.ToArray(allowedInputVariables.Concat(new string[] { targetVariable }), rows); 187 if (inputMatrix.ContainsNan Inf())187 if (inputMatrix.ContainsNanOrInfinity()) 188 188 throw new NotSupportedException("Neural network classification does not support NaN or infinity values in the input dataset."); 189 189 -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs
r15783 r15786 171 171 IEnumerable<int> rows = problemData.TrainingIndices; 172 172 double[,] inputMatrix = dataset.ToArray(allowedInputVariables.Concat(new string[] { targetVariable }), rows); 173 if (inputMatrix.ContainsNan Inf())173 if (inputMatrix.ContainsNanOrInfinity()) 174 174 throw new NotSupportedException("Neural network ensemble classification does not support NaN or infinity values in the input dataset."); 175 175 -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs
r15783 r15786 170 170 IEnumerable<int> rows = problemData.TrainingIndices; 171 171 double[,] inputMatrix = dataset.ToArray(allowedInputVariables.Concat(new string[] { targetVariable }), rows); 172 if (inputMatrix.ContainsNan Inf())172 if (inputMatrix.ContainsNanOrInfinity()) 173 173 throw new NotSupportedException("Neural network ensemble regression does not support NaN or infinity values in the input dataset."); 174 174 -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs
r15783 r15786 186 186 IEnumerable<int> rows = problemData.TrainingIndices; 187 187 double[,] inputMatrix = dataset.ToArray(allowedInputVariables.Concat(new string[] { targetVariable }), rows); 188 if (inputMatrix.ContainsNan Inf())188 if (inputMatrix.ContainsNanOrInfinity()) 189 189 throw new NotSupportedException("Neural network regression does not support NaN or infinity values in the input dataset."); 190 190 -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs
r15783 r15786 370 370 371 371 private static void AssertInputMatrix(double[,] inputMatrix) { 372 if (inputMatrix.ContainsNan Inf())372 if (inputMatrix.ContainsNanOrInfinity()) 373 373 throw new NotSupportedException("Random forest modeling does not support NaN or infinity values in the input dataset."); 374 374 } -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TimeSeries/AutoregressiveModeling.cs
r15783 r15786 96 96 inputMatrix[i, timeOffset] = targetValues[i + problemData.TrainingPartition.Start]; 97 97 98 if (inputMatrix.ContainsNan Inf())98 if (inputMatrix.ContainsNanOrInfinity()) 99 99 throw new NotSupportedException("Linear regression does not support NaN or infinity values in the input dataset."); 100 100 -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClustering.cs
r15783 r15786 91 91 int[] xyc; 92 92 double[,] inputMatrix = dataset.ToArray(allowedInputVariables, rows); 93 if (inputMatrix.ContainsNan Inf())93 if (inputMatrix.ContainsNanOrInfinity()) 94 94 throw new NotSupportedException("k-Means clustering does not support NaN or infinity values in the input dataset."); 95 95
Note: See TracChangeset
for help on using the changeset viewer.