Changeset 17833


Ignore:
Timestamp:
02/09/21 17:08:22 (3 weeks ago)
Author:
bburlacu
Message:

#2806: Set positive class value when cloning problem data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3087_Ceres_Integration/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs

    r17180 r17833  
    515515          dataset = dataset.Shuffle(random);
    516516        }
    517         var problemDataClone = new ClassificationProblemData(dataset, Problem.ProblemData.AllowedInputVariables, targetVariable);
     517        var problemData = (IClassificationProblemData)Problem.ProblemData;
     518        var problemDataClone = new ClassificationProblemData(dataset, problemData.AllowedInputVariables, targetVariable);
    518519        // set partitions of problem data clone correctly
    519520        problemDataClone.TrainingPartition.Start = SamplesStart.Value; problemDataClone.TrainingPartition.End = SamplesEnd.Value;
    520521        problemDataClone.TestPartition.Start = SamplesStart.Value; problemDataClone.TestPartition.End = SamplesEnd.Value;
     522        problemDataClone.PositiveClass = problemData.PositiveClass;
    521523        // clone models
    522524        var ensembleSolution = new ClassificationEnsembleSolution(problemDataClone);
Note: See TracChangeset for help on using the changeset viewer.