Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/09/11 18:58:09 (13 years ago)
Author:
gkronber
Message:

#1615 clone problem before creating a solution

Location:
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork
Files:
4 edited

Legend:

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

    r6580 r6649  
    188188      relClassError = alglib.mlpclserror(multiLayerPerceptron, inputMatrix, nRows) / (double)nRows;
    189189
    190       return new NeuralNetworkClassificationSolution(problemData, new NeuralNetworkModel(multiLayerPerceptron, targetVariable, allowedInputVariables, problemData.ClassValues.ToArray()));
     190      var problemDataClone = (IClassificationProblemData)problemData.Clone();
     191      return new NeuralNetworkClassificationSolution(problemDataClone, new NeuralNetworkModel(multiLayerPerceptron, targetVariable, allowedInputVariables, problemDataClone.ClassValues.ToArray()));
    191192    }
    192193    #endregion
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs

    r6580 r6649  
    198198      avgRelError = alglib.mlpeavgrelerror(mlpEnsemble, inputMatrix, nRows);
    199199      relClassError = alglib.mlperelclserror(mlpEnsemble, inputMatrix, nRows);
    200 
    201       return new NeuralNetworkEnsembleClassificationSolution(problemData, new NeuralNetworkEnsembleModel(mlpEnsemble, targetVariable, allowedInputVariables, problemData.ClassValues.ToArray()));
     200      var problemDataClone = (IClassificationProblemData)problemData.Clone();
     201      return new NeuralNetworkEnsembleClassificationSolution(problemDataClone, new NeuralNetworkEnsembleModel(mlpEnsemble, targetVariable, allowedInputVariables, problemDataClone.ClassValues.ToArray()));
    202202    }
    203203    #endregion
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs

    r6580 r6649  
    185185      avgRelError = alglib.mlpeavgrelerror(mlpEnsemble, inputMatrix, nRows);
    186186
    187       return new NeuralNetworkEnsembleRegressionSolution(problemData, new NeuralNetworkEnsembleModel(mlpEnsemble, targetVariable, allowedInputVariables));
     187      return new NeuralNetworkEnsembleRegressionSolution((IRegressionProblemData)problemData.Clone(), new NeuralNetworkEnsembleModel(mlpEnsemble, targetVariable, allowedInputVariables));
    188188    }
    189189    #endregion
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs

    r6580 r6649  
    179179      avgRelError = alglib.mlpavgrelerror(multiLayerPerceptron, inputMatrix, nRows);     
    180180
    181       return new NeuralNetworkRegressionSolution(problemData, new NeuralNetworkModel(multiLayerPerceptron, targetVariable, allowedInputVariables));
     181      return new NeuralNetworkRegressionSolution((IRegressionProblemData)problemData.Clone(), new NeuralNetworkModel(multiLayerPerceptron, targetVariable, allowedInputVariables));
    182182    }
    183183    #endregion
Note: See TracChangeset for help on using the changeset viewer.