Changeset 9919 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 08/30/13 21:11:48 (11 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs
r9456 r9919 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;29 28 using HeuristicLab.Optimization; 29 using HeuristicLab.Parameters; 30 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 31 using HeuristicLab.Problems.DataAnalysis; 32 using HeuristicLab.Problems.DataAnalysis.Symbolic;33 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;34 using HeuristicLab.Parameters;35 32 36 33 namespace HeuristicLab.Algorithms.DataAnalysis { … … 47 44 private const string NodesInSecondHiddenLayerParameterName = "NodesInSecondHiddenLayer"; 48 45 private const string RestartsParameterName = "Restarts"; 49 private const string NeuralNetwork RegressionModelResultName = "Neural network classification solution";46 private const string NeuralNetworkClassificationModelResultName = "Neural network classification solution"; 50 47 51 48 #region parameter properties … … 174 171 double rmsError, avgRelError, relClassError; 175 172 var solution = CreateNeuralNetworkClassificationSolution(Problem.ProblemData, HiddenLayers, NodesInFirstHiddenLayer, NodesInSecondHiddenLayer, Decay, Restarts, out rmsError, out avgRelError, out relClassError); 176 Results.Add(new Result(NeuralNetwork RegressionModelResultName, "The neural network regression solution.", solution));177 Results.Add(new Result("Root mean square error", "The root of the mean of squared errors of the neural network regression solution on the training set.", new DoubleValue(rmsError)));178 Results.Add(new Result("Average relative error", "The average of relative errors of the neural network regression solution on the training set.", new PercentValue(avgRelError)));173 Results.Add(new Result(NeuralNetworkClassificationModelResultName, "The neural network classification solution.", solution)); 174 Results.Add(new Result("Root mean square error", "The root of the mean of squared errors of the neural network classification solution on the training set.", new DoubleValue(rmsError))); 175 Results.Add(new Result("Average relative error", "The average of relative errors of the neural network classification solution on the training set.", new PercentValue(avgRelError))); 179 176 Results.Add(new Result("Relative classification error", "The percentage of misclassified samples.", new PercentValue(relClassError))); 180 177 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs
r9456 r9919 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;29 28 using HeuristicLab.Optimization; 29 using HeuristicLab.Parameters; 30 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 31 using HeuristicLab.Problems.DataAnalysis; 32 using HeuristicLab.Problems.DataAnalysis.Symbolic;33 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;34 using HeuristicLab.Parameters;35 32 36 33 namespace HeuristicLab.Algorithms.DataAnalysis { … … 161 158 var solution = CreateNeuralNetworkEnsembleClassificationSolution(Problem.ProblemData, EnsembleSize, HiddenLayers, NodesInFirstHiddenLayer, NodesInSecondHiddenLayer, Decay, Restarts, out rmsError, out avgRelError, out relClassError); 162 159 Results.Add(new Result(NeuralNetworkEnsembleClassificationModelResultName, "The neural network ensemble classification solution.", solution)); 163 Results.Add(new Result("Root mean square error", "The root of the mean of squared errors of the neural network ensemble regression solution on the training set.", new DoubleValue(rmsError)));164 Results.Add(new Result("Average relative error", "The average of relative errors of the neural network ensemble regression solution on the training set.", new PercentValue(avgRelError)));160 Results.Add(new Result("Root mean square error", "The root of the mean of squared errors of the neural network ensemble classification solution on the training set.", new DoubleValue(rmsError))); 161 Results.Add(new Result("Average relative error", "The average of relative errors of the neural network ensemble classification solution on the training set.", new PercentValue(avgRelError))); 165 162 Results.Add(new Result("Relative classification error", "The percentage of misclassified samples.", new PercentValue(relClassError))); 166 163 } … … 201 198 int info; 202 199 alglib.mlpetraines(mlpEnsemble, inputMatrix, nRows, decay, restarts, out info, out rep); 203 if (info != 6) throw new ArgumentException("Error in calculation of neural network ensemble regression solution");200 if (info != 6) throw new ArgumentException("Error in calculation of neural network ensemble classification solution"); 204 201 205 202 rmsError = alglib.mlpermserror(mlpEnsemble, inputMatrix, nRows); -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs
r9456 r9919 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;29 28 using HeuristicLab.Optimization; 29 using HeuristicLab.Parameters; 30 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 31 using HeuristicLab.Problems.DataAnalysis; 32 using HeuristicLab.Problems.DataAnalysis.Symbolic;33 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;34 using HeuristicLab.Parameters;35 32 36 33 namespace HeuristicLab.Algorithms.DataAnalysis {
Note: See TracChangeset
for help on using the changeset viewer.