Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15149


Ignore:
Timestamp:
07/06/17 11:37:43 (7 years ago)
Author:
gkronber
Message:

#2756: merged r14781 from trunk to stable

File:
1 edited

Legend:

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

    r14186 r15149  
    451451      var aggregatedResults = new List<IResult>();
    452452      foreach (KeyValuePair<string, List<IClassificationSolution>> solutions in resultSolutions) {
    453         // clone manually to correctly clone references between cloned root objects
    454         Cloner cloner = new Cloner();
    455         var problemDataClone = (IClassificationProblemData)cloner.Clone(Problem.ProblemData);
     453        // at least one algorithm (GBT with logistic regression loss) produces a classification solution even though the original problem is a regression problem.
     454        var targetVariable = solutions.Value.First().ProblemData.TargetVariable;
     455        var problemDataClone = new ClassificationProblemData(Problem.ProblemData.Dataset,
     456          Problem.ProblemData.AllowedInputVariables, targetVariable);
    456457        // set partitions of problem data clone correctly
    457458        problemDataClone.TrainingPartition.Start = SamplesStart.Value; problemDataClone.TrainingPartition.End = SamplesEnd.Value;
Note: See TracChangeset for help on using the changeset viewer.