Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/11 11:31:45 (13 years ago)
Author:
gkronber
Message:

#1474 removed range limit for MLP output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs

    r6649 r6719  
    155155        throw new NotSupportedException("Neural network regression does not support NaN or infinity values in the input dataset.");
    156156
    157       double targetMin = problemData.Dataset.GetEnumeratedVariableValues(targetVariable).Min();
    158       targetMin = targetMin - targetMin * 0.1; // -10%
    159       double targetMax = problemData.Dataset.GetEnumeratedVariableValues(targetVariable).Max();
    160       targetMax = targetMax + targetMax * 0.1; // + 10%
    161 
    162157      alglib.multilayerperceptron multiLayerPerceptron = null;
    163158      if (nLayers == 0) {
    164         alglib.mlpcreater0(allowedInputVariables.Count(), 1, targetMin, targetMax, out multiLayerPerceptron);
     159        alglib.mlpcreate0(allowedInputVariables.Count(), 1, out multiLayerPerceptron);
    165160      } else if (nLayers == 1) {
    166         alglib.mlpcreater1(allowedInputVariables.Count(), nHiddenNodes1, 1, targetMin, targetMax, out multiLayerPerceptron);
     161        alglib.mlpcreate1(allowedInputVariables.Count(), nHiddenNodes1, 1, out multiLayerPerceptron);
    167162      } else if (nLayers == 2) {
    168         alglib.mlpcreater2(allowedInputVariables.Count(), nHiddenNodes1, nHiddenNodes2, 1, targetMin, targetMax, out multiLayerPerceptron);
     163        alglib.mlpcreate2(allowedInputVariables.Count(), nHiddenNodes1, nHiddenNodes2, 1, out multiLayerPerceptron);
    169164      } else throw new ArgumentException("Number of layers must be zero, one, or two.", "nLayers");
    170165      alglib.mlpreport rep;
     
    177172
    178173      rmsError = alglib.mlprmserror(multiLayerPerceptron, inputMatrix, nRows);
    179       avgRelError = alglib.mlpavgrelerror(multiLayerPerceptron, inputMatrix, nRows);     
     174      avgRelError = alglib.mlpavgrelerror(multiLayerPerceptron, inputMatrix, nRows);
    180175
    181176      return new NeuralNetworkRegressionSolution((IRegressionProblemData)problemData.Clone(), new NeuralNetworkModel(multiLayerPerceptron, targetVariable, allowedInputVariables));
Note: See TracChangeset for help on using the changeset viewer.