Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7738


Ignore:
Timestamp:
04/17/12 17:40:46 (13 years ago)
Author:
gkronber
Message:

#1722 added an additional ctor for RegerssionEnsembleSolution to simplify code.

Location:
trunk/sources
Files:
3 edited

Legend:

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

    r7259 r7738  
    295295              symbolicProblem.FitnessCalculationPartition.End = SamplesEnd.Value;
    296296            }
    297 
     297            clonedAlgorithm.Prepare();
    298298            clonedAlgorithms.Add(clonedAlgorithm);
    299299          }
     
    416416        problemDataClone.TestPartition.Start = SamplesStart.Value; problemDataClone.TestPartition.End = SamplesEnd.Value;
    417417        // clone models
    418         var ensembleSolution = new RegressionEnsembleSolution(
    419           solutions.Value.Select(x => cloner.Clone(x.Model)),
    420           problemDataClone,
    421           solutions.Value.Select(x => cloner.Clone(x.ProblemData.TrainingPartition)),
    422           solutions.Value.Select(x => cloner.Clone(x.ProblemData.TestPartition)));
     418        var ensembleSolution = new RegressionEnsembleSolution(problemDataClone);
     419        ensembleSolution.AddRegressionSolutions(solutions.Value);
    423420
    424421        aggregatedResults.Add(new Result(solutions.Key + " (ensemble)", ensembleSolution));
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs

    r7259 r7738  
    7373              .First()
    7474              .ProblemData.Clone();
    75             var ensemble = new RegressionEnsembleSolution(Enumerable.Empty<IRegressionModel>(), problemData);
     75            var ensemble = new RegressionEnsembleSolution(problemData);
    7676            ensemble.Name = group.Key + " ensemble";
    7777            var nestedSolutions = group.OfType<RegressionEnsembleSolution>().SelectMany(e => e.RegressionSolutions);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs

    r7259 r7738  
    9797
    9898      RegisterRegressionSolutionsEventHandler();
     99    }
     100
     101    public RegressionEnsembleSolution(IRegressionProblemData problemData)
     102      : this(Enumerable.Empty<IRegressionModel>(), problemData) {
    99103    }
    100104
Note: See TracChangeset for help on using the changeset viewer.