Changeset 13702
- Timestamp:
- 03/15/16 11:39:21 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs
r13698 r13702 124 124 testEvaluationCache = new Dictionary<int, double>(problemData.TestIndices.Count()); 125 125 126 RegisterRegressionSolutionsEventHandler(); 126 127 127 var solutions = model.Models.Select(m => m.CreateRegressionSolution((IRegressionProblemData)problemData.Clone())); 128 regressionSolutions.AddRange(solutions); 128 foreach (var solution in solutions) { 129 regressionSolutions.Add(solution); 130 trainingPartitions.Add(solution.Model, solution.ProblemData.TrainingPartition); 131 testPartitions.Add(solution.Model, solution.ProblemData.TestPartition); 132 } 133 134 RecalculateResults(); 135 RegisterRegressionSolutionsEventHandler(); 129 136 } 130 137 … … 261 268 if (Model.Models.Contains(solution.Model)) throw new ArgumentException(); 262 269 Model.Add(solution.Model); 270 263 271 trainingPartitions[solution.Model] = solution.ProblemData.TrainingPartition; 264 272 testPartitions[solution.Model] = solution.ProblemData.TestPartition; … … 272 280 if (!Model.Models.Contains(solution.Model)) throw new ArgumentException(); 273 281 Model.Remove(solution.Model); 282 274 283 trainingPartitions.Remove(solution.Model); 275 284 testPartitions.Remove(solution.Model);
Note: See TracChangeset
for help on using the changeset viewer.