Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/30/15 18:42:18 (9 years ago)
Author:
gkronber
Message:

#2434: merged r12787:12819 from trunk to branch

Location:
branches/crossvalidation-2434
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/crossvalidation-2434

  • branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis

  • branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs

    r12509 r12820  
    5050    }
    5151
     52    [Storable]
    5253    private readonly ItemCollection<IRegressionSolution> regressionSolutions;
    5354    public IItemCollection<IRegressionSolution> RegressionSolutions {
     
    6768    [StorableHook(HookType.AfterDeserialization)]
    6869    private void AfterDeserialization() {
    69       foreach (var model in Model.Models) {
    70         IRegressionProblemData problemData = (IRegressionProblemData)ProblemData.Clone();
    71         problemData.TrainingPartition.Start = trainingPartitions[model].Start;
    72         problemData.TrainingPartition.End = trainingPartitions[model].End;
    73         problemData.TestPartition.Start = testPartitions[model].Start;
    74         problemData.TestPartition.End = testPartitions[model].End;
    75 
    76         regressionSolutions.Add(model.CreateRegressionSolution(problemData));
     70      if (!regressionSolutions.Any()) {
     71        foreach (var model in Model.Models) {
     72          IRegressionProblemData problemData = (IRegressionProblemData)ProblemData.Clone();
     73          problemData.TrainingPartition.Start = trainingPartitions[model].Start;
     74          problemData.TrainingPartition.End = trainingPartitions[model].End;
     75          problemData.TestPartition.Start = testPartitions[model].Start;
     76          problemData.TestPartition.End = testPartitions[model].End;
     77
     78          regressionSolutions.Add(model.CreateRegressionSolution(problemData));
     79        }
    7780      }
    7881      RegisterRegressionSolutionsEventHandler();
Note: See TracChangeset for help on using the changeset viewer.