Changeset 18006 for branches/3087_Ceres_Integration/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs
- Timestamp:
- 07/13/21 10:55:09 (3 years ago)
- Location:
- branches/3087_Ceres_Integration
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3087_Ceres_Integration
- Property svn:mergeinfo changed
-
branches/3087_Ceres_Integration/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
-
branches/3087_Ceres_Integration/HeuristicLab.Algorithms.DataAnalysis/3.4
- Property svn:mergeinfo changed
-
branches/3087_Ceres_Integration/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs
r17180 r18006 186 186 IEnumerable<int> rows = problemData.TrainingIndices; 187 187 double[,] inputMatrix = dataset.ToArray(allowedInputVariables.Concat(new string[] { targetVariable }), rows); 188 int nRows = inputMatrix.GetLength(0); 188 189 if (inputMatrix.ContainsNanOrInfinity()) 189 190 throw new NotSupportedException("Neural network regression does not support NaN or infinity values in the input dataset."); … … 197 198 alglib.mlpcreate2(allowedInputVariables.Count(), nHiddenNodes1, nHiddenNodes2, 1, out multiLayerPerceptron); 198 199 } else throw new ArgumentException("Number of layers must be zero, one, or two.", "nLayers"); 199 alglib.mlpreport rep;200 int nRows = inputMatrix.GetLength(0);201 200 202 201 int info; 203 202 // using mlptrainlm instead of mlptraines or mlptrainbfgs because only one parameter is necessary 204 alglib.mlptrainlm(multiLayerPerceptron, inputMatrix, nRows, decay, restarts, out info, out rep);203 alglib.mlptrainlm(multiLayerPerceptron, inputMatrix, nRows, decay, restarts, out info, out _); 205 204 if (info != 2) throw new ArgumentException("Error in calculation of neural network regression solution"); 206 205
Note: See TracChangeset
for help on using the changeset viewer.