Changeset 6649 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4
- Timestamp:
- 08/09/11 18:58:09 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs
r6240 r6649 106 106 107 107 var model = LinearDiscriminantAnalysis.CreateDiscriminantFunctionModel(tree, new SymbolicDataAnalysisExpressionTreeInterpreter(), problemData, rows); 108 SymbolicDiscriminantFunctionClassificationSolution solution = new SymbolicDiscriminantFunctionClassificationSolution(model, problemData);108 SymbolicDiscriminantFunctionClassificationSolution solution = new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)problemData.Clone()); 109 109 110 110 return solution; -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
r6555 r6649 110 110 addition.AddSubtree(cNode); 111 111 112 SymbolicRegressionSolution solution = new SymbolicRegressionSolution(new SymbolicRegressionModel(tree, new SymbolicDataAnalysisExpressionTreeInterpreter()), problemData);112 SymbolicRegressionSolution solution = new SymbolicRegressionSolution(new SymbolicRegressionModel(tree, new SymbolicDataAnalysisExpressionTreeInterpreter()), (IRegressionProblemData)problemData.Clone()); 113 113 solution.Model.Name = "Linear Regression Model"; 114 114 return solution; -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs
r6633 r6649 95 95 relClassError = alglib.mnlrelclserror(lm, inputMatrix, nRows); 96 96 97 MultinomialLogitClassificationSolution solution = new MultinomialLogitClassificationSolution( problemData, new MultinomialLogitModel(lm, targetVariable, allowedInputVariables, classValues));97 MultinomialLogitClassificationSolution solution = new MultinomialLogitClassificationSolution((IClassificationProblemData)problemData.Clone(), new MultinomialLogitModel(lm, targetVariable, allowedInputVariables, classValues)); 98 98 return solution; 99 99 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs
r6583 r6649 107 107 } 108 108 alglib.nearestneighbor.kdtreebuild(inputMatrix, nRows, inputMatrix.GetLength(1) - 1, 1, 2, kdtree); 109 110 return new NearestNeighbourClassificationSolution(problemData , new NearestNeighbourModel(kdtree, k, targetVariable, allowedInputVariables, problemData.ClassValues.ToArray()));109 var problemDataClone = (IClassificationProblemData) problemData.Clone(); 110 return new NearestNeighbourClassificationSolution(problemDataClone, new NearestNeighbourModel(kdtree, k, targetVariable, allowedInputVariables, problemDataClone.ClassValues.ToArray())); 111 111 } 112 112 #endregion -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourRegression.cs
r6583 r6649 98 98 alglib.nearestneighbor.kdtreebuild(inputMatrix, nRows, inputMatrix.GetLength(1) - 1, 1, 2, kdtree); 99 99 100 return new NearestNeighbourRegressionSolution( problemData, new NearestNeighbourModel(kdtree, k, targetVariable, allowedInputVariables));100 return new NearestNeighbourRegressionSolution((IRegressionProblemData)problemData.Clone(), new NearestNeighbourModel(kdtree, k, targetVariable, allowedInputVariables)); 101 101 } 102 102 #endregion -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs
r6580 r6649 188 188 relClassError = alglib.mlpclserror(multiLayerPerceptron, inputMatrix, nRows) / (double)nRows; 189 189 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())); 191 192 } 192 193 #endregion -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs
r6580 r6649 198 198 avgRelError = alglib.mlpeavgrelerror(mlpEnsemble, inputMatrix, nRows); 199 199 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())); 202 202 } 203 203 #endregion -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs
r6580 r6649 185 185 avgRelError = alglib.mlpeavgrelerror(mlpEnsemble, inputMatrix, nRows); 186 186 187 return new NeuralNetworkEnsembleRegressionSolution( problemData, new NeuralNetworkEnsembleModel(mlpEnsemble, targetVariable, allowedInputVariables));187 return new NeuralNetworkEnsembleRegressionSolution((IRegressionProblemData)problemData.Clone(), new NeuralNetworkEnsembleModel(mlpEnsemble, targetVariable, allowedInputVariables)); 188 188 } 189 189 #endregion -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs
r6580 r6649 179 179 avgRelError = alglib.mlpavgrelerror(multiLayerPerceptron, inputMatrix, nRows); 180 180 181 return new NeuralNetworkRegressionSolution( problemData, new NeuralNetworkModel(multiLayerPerceptron, targetVariable, allowedInputVariables));181 return new NeuralNetworkRegressionSolution((IRegressionProblemData)problemData.Clone(), new NeuralNetworkModel(multiLayerPerceptron, targetVariable, allowedInputVariables)); 182 182 } 183 183 #endregion -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs
r6241 r6649 126 126 relClassificationError = rep.relclserror; 127 127 outOfBagRelClassificationError = rep.oobrelclserror; 128 return new RandomForestClassificationSolution( problemData, new RandomForestModel(dforest, targetVariable, allowedInputVariables, classValues));128 return new RandomForestClassificationSolution((IClassificationProblemData)problemData.Clone(), new RandomForestModel(dforest, targetVariable, allowedInputVariables, classValues)); 129 129 } 130 130 #endregion -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegression.cs
r6241 r6649 116 116 outOfBagRmsError = rep.oobrmserror; 117 117 118 return new RandomForestRegressionSolution( problemData, new RandomForestModel(dforest, targetVariable, allowedInputVariables));118 return new RandomForestRegressionSolution((IRegressionProblemData)problemData.Clone(), new RandomForestModel(dforest, targetVariable, allowedInputVariables)); 119 119 } 120 120 #endregion
Note: See TracChangeset
for help on using the changeset viewer.