Changeset 8528
- Timestamp:
- 08/27/12 16:55:14 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
r7738 r8528 447 447 problemDataClone.TestPartition.Start = SamplesStart.Value; problemDataClone.TestPartition.End = SamplesEnd.Value; 448 448 // clone models 449 var ensembleSolution = new ClassificationEnsembleSolution( 450 solutions.Value.Select(x => cloner.Clone(x.Model)), 451 problemDataClone, 452 solutions.Value.Select(x => cloner.Clone(x.ProblemData.TrainingPartition)), 453 solutions.Value.Select(x => cloner.Clone(x.ProblemData.TestPartition))); 449 var ensembleSolution = new ClassificationEnsembleSolution(problemDataClone); 450 ensembleSolution.AddClassificationSolutions(solutions.Value); 454 451 455 452 aggregatedResults.Add(new Result(solutions.Key + " (ensemble)", ensembleSolution)); -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessModel.cs
r8484 r8528 220 220 } 221 221 public GaussianProcessRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 222 return new GaussianProcessRegressionSolution(this, problemData);222 return new GaussianProcessRegressionSolution(this, new RegressionProblemData(problemData)); 223 223 } 224 224 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitModel.cs
r7259 r8528 109 109 110 110 public MultinomialLogitClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 111 return new MultinomialLogitClassificationSolution( problemData, this);111 return new MultinomialLogitClassificationSolution(new ClassificationProblemData(problemData), this); 112 112 } 113 113 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Nca/NcaModel.cs
r8471 r8528 82 82 83 83 public INcaClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 84 return new NcaClassificationSolution( problemData, this);84 return new NcaClassificationSolution(new ClassificationProblemData(problemData), this); 85 85 } 86 86 -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
r8467 r8528 202 202 203 203 public INearestNeighbourRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 204 return new NearestNeighbourRegressionSolution( problemData, this);204 return new NearestNeighbourRegressionSolution(new RegressionProblemData(problemData), this); 205 205 } 206 206 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { … … 208 208 } 209 209 public INearestNeighbourClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 210 return new NearestNeighbourClassificationSolution( problemData, this);210 return new NearestNeighbourClassificationSolution(new ClassificationProblemData(problemData), this); 211 211 } 212 212 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleModel.cs
r7694 r8528 130 130 131 131 public INeuralNetworkEnsembleRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 132 return new NeuralNetworkEnsembleRegressionSolution( problemData, this);132 return new NeuralNetworkEnsembleRegressionSolution(new RegressionEnsembleProblemData(problemData), this); 133 133 } 134 134 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { … … 136 136 } 137 137 public INeuralNetworkEnsembleClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 138 return new NeuralNetworkEnsembleClassificationSolution( problemData, this);138 return new NeuralNetworkEnsembleClassificationSolution(new ClassificationEnsembleProblemData(problemData), this); 139 139 } 140 140 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkModel.cs
r7259 r8528 138 138 139 139 public INeuralNetworkRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 140 return new NeuralNetworkRegressionSolution( problemData, this);140 return new NeuralNetworkRegressionSolution(new RegressionProblemData(problemData), this); 141 141 } 142 142 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { … … 144 144 } 145 145 public INeuralNetworkClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 146 return new NeuralNetworkClassificationSolution( problemData, this);146 return new NeuralNetworkClassificationSolution(new ClassificationProblemData(problemData), this); 147 147 } 148 148 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs
r7259 r8528 132 132 133 133 public IRandomForestRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 134 return new RandomForestRegressionSolution( problemData, this);134 return new RandomForestRegressionSolution(new RegressionProblemData(problemData), this); 135 135 } 136 136 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { … … 138 138 } 139 139 public IRandomForestClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 140 return new RandomForestClassificationSolution( problemData, this);140 return new RandomForestClassificationSolution(new ClassificationProblemData(problemData), this); 141 141 } 142 142 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs
r8323 r8528 124 124 } 125 125 public SupportVectorRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 126 return new SupportVectorRegressionSolution(this, problemData);126 return new SupportVectorRegressionSolution(this, new RegressionProblemData(problemData)); 127 127 } 128 128 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { … … 153 153 154 154 public SupportVectorClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 155 return new SupportVectorClassificationSolution(this, problemData);155 return new SupportVectorClassificationSolution(this, new ClassificationProblemData(problemData)); 156 156 } 157 157 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationModel.cs
r7259 r8528 51 51 52 52 public ISymbolicClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 53 return new SymbolicClassificationSolution(this, problemData);53 return new SymbolicClassificationSolution(this, new ClassificationProblemData(problemData)); 54 54 } 55 55 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs
r8139 r8528 105 105 106 106 public SymbolicDiscriminantFunctionClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 107 return new SymbolicDiscriminantFunctionClassificationSolution(this, problemData);107 return new SymbolicDiscriminantFunctionClassificationSolution(this, new ClassificationProblemData(problemData)); 108 108 } 109 109 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs
r8139 r8528 64 64 65 65 public ISymbolicRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 66 return new SymbolicRegressionSolution(this, problemData);66 return new SymbolicRegressionSolution(this, new RegressionProblemData(problemData)); 67 67 } 68 68 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs
r7259 r8528 95 95 96 96 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { 97 return new ClassificationEnsembleSolution(models, problemData);97 return new ClassificationEnsembleSolution(models, new ClassificationEnsembleProblemData(problemData)); 98 98 } 99 99 #endregion -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs
r8174 r8528 104 104 } 105 105 106 public ClassificationEnsembleSolution(IClassificationProblemData problemData) : 107 this(Enumerable.Empty<IClassificationModel>(), problemData) { } 108 106 109 public ClassificationEnsembleSolution(IEnumerable<IClassificationModel> models, IClassificationProblemData problemData) 107 110 : this(models, problemData, -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r8121 r8528 277 277 278 278 public ClassificationProblemData() : this(defaultDataset, defaultAllowedInputVariables, defaultTargetVariable) { } 279 280 public ClassificationProblemData(IClassificationProblemData classificationProblemData) 281 : this(classificationProblemData.Dataset, classificationProblemData.AllowedInputVariables, classificationProblemData.TargetVariable) { 282 TrainingPartition.Start = classificationProblemData.TrainingPartition.Start; 283 TrainingPartition.End = classificationProblemData.TrainingPartition.End; 284 TestPartition.Start = classificationProblemData.TestPartition.Start; 285 TestPartition.End = classificationProblemData.TestPartition.End; 286 } 287 279 288 public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable) 280 289 : base(dataset, allowedInputVariables) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
r7259 r8528 55 55 56 56 public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 57 return new ConstantRegressionSolution(this, problemData);57 return new ConstantRegressionSolution(this, new RegressionProblemData(problemData)); 58 58 } 59 59 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
r7259 r8528 102 102 103 103 public RegressionEnsembleSolution CreateRegressionSolution(IRegressionProblemData problemData) { 104 return new RegressionEnsembleSolution(this.Models, problemData);104 return new RegressionEnsembleSolution(this.Models, new RegressionEnsembleProblemData(problemData)); 105 105 } 106 106 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r8121 r8528 121 121 : this(defaultDataset, defaultAllowedInputVariables, defaultTargetVariable) { 122 122 } 123 public RegressionProblemData(IRegressionProblemData regressionProblemData) 124 : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable) { 125 TrainingPartition.Start = regressionProblemData.TrainingPartition.Start; 126 TrainingPartition.End = regressionProblemData.TrainingPartition.End; 127 TestPartition.Start = regressionProblemData.TestPartition.Start; 128 TestPartition.End = regressionProblemData.TestPartition.End; 129 } 123 130 124 131 public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable)
Note: See TracChangeset
for help on using the changeset viewer.