Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/30/18 16:39:01 (7 years ago)
Author:
fholzing
Message:

#2883: Implemented third option for complete storage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2883_GBTModelStorage/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs

    r15675 r15678  
    2121#endregion
    2222
     23using System;
    2324using System.Linq;
    2425using System.Threading;
     
    284285
    285286      // produce solution
    286       if (CreateSolution == ModelStorage.Parameter) {
    287         var model = state.GetModel();
     287      if (CreateSolution == ModelStorage.Parameter || CreateSolution == ModelStorage.Complete) {
     288        IRegressionModel model = null;
     289
     290        if (CreateSolution == ModelStorage.Parameter) {
     291          model = state.GetModel();
     292        } else if (CreateSolution == ModelStorage.Complete) {
     293          //If "Complete", a deep-copy is required, so no lazy lists
     294          model = state.GetModel(false);
     295          (model as GradientBoostedTreesModel).IsCompatibilityLoaded = true;
     296        }
    288297
    289298        // for logistic regression we produce a classification solution
     
    307316          Results.Add(new Result("Solution", new GradientBoostedTreesSolution(model, problemData)));
    308317        }
     318      } else if (CreateSolution == ModelStorage.Quality) {
     319        //Do nothing
     320      } else {
     321        throw new NotImplementedException("Selected parameter for CreateSolution isn't implemented yet");
    309322      }
    310323    }
Note: See TracChangeset for help on using the changeset viewer.