Changeset 13699


Ignore:
Timestamp:
03/14/16 17:50:15 (5 years ago)
Author:
mkommend
Message:

#1795: Adapted creation of regression ensemble to new ctors (see also #2590 r13698).

File:
1 edited

Legend:

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

    r13653 r13699  
    2626using System.Threading;
    2727using HeuristicLab.Analysis;
    28 using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
    2928using HeuristicLab.Common;
    3029using HeuristicLab.Core;
     
    316315          }
    317316          // just produce an ensemble solution for now (TODO: correct scaling or linear regression for ensemble model weights)
    318           Results.Add(new Result("EnsembleSolution", new RegressionEnsembleSolution(models, (IRegressionProblemData)problemData.Clone())));
     317
     318          var ensembleModel = new RegressionEnsembleModel(models);
     319          var ensembleSolution = ensembleModel.CreateRegressionSolution((IRegressionProblemData)problemData.Clone());
     320          Results.Add(new Result("EnsembleSolution", ensembleSolution));
    319321        }
    320       } finally {
     322      }
     323      finally {
    321324        // reset everything
    322325        alg.Prepare(true);
     
    432435            model = sol.Model;
    433436          }
    434         } finally {
     437        }
     438        finally {
    435439          alg.ExceptionOccurred -= handler;
    436440          alg.Stopped -= handler2;
Note: See TracChangeset for help on using the changeset viewer.