Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/23/15 18:01:58 (10 years ago)
Author:
ehopf
Message:

#2335: Added code to keep the user defined positive class in the generated problem data of a classification problem. (Defect 2 fix)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs

    r12058 r12063  
    7777
    7878    private IDataAnalysisProblemData CreateClassificationData(ClassificationProblemData oldProblemData) {
     79      // target variable must be double and must exist in the new dataset
    7980      var targetVariable = oldProblemData.TargetVariable;
    80       // target variable must be double and must exist in the new dataset
    81       return new ClassificationProblemData(ExportedDataset, GetDoubleInputVariables(targetVariable), targetVariable, Transformations);
     81      var newProblemData = new ClassificationProblemData(ExportedDataset, GetDoubleInputVariables(targetVariable), targetVariable, Transformations);
     82      newProblemData.PositiveClass = oldProblemData.PositiveClass;
     83      return newProblemData;
    8284    }
    8385
Note: See TracChangeset for help on using the changeset viewer.