Opened 4 months ago

Last modified 2 months ago

#3102 assigned defect

Enable passing dataset and class names in ClassificationProblemData constructor

Reported by: bburlacu Owned by: bburlacu
Priority: medium Milestone: HeuristicLab 3.3.17
Component: Problems.DataAnalysis Version: trunk
Keywords: Cc:

Description

Summary

  • Creating a copy/clone of a problem data object is a very common use case within our code base.
  • In the case of classification problems, one would like to preserve class names/positive class value while changing the dataset or its attributes (eg training/test partitions, shuffling).
  • However, this is not easily possible at the moment, forcing the programmer to manually take care of these properties after a new problem data object has been created, leading to cumbersome and more bug-prone code
  • This has already caused problems as seen in #2806 and #3053 (new object is initialized, programmer forgets/is not aware of all the properties that need to be consistent)

This ticket superseeds #2806 and #3053 and will track the required changes in ClassificationProblemData.cs and dependents.

Change History (5)

comment:1 Changed 4 months ago by bburlacu

r17835: Add ClassificationProblemData constructor that explicitly takes class names and positive class value arguments, adapt code.

comment:2 Changed 4 months ago by bburlacu

  • Status changed from new to accepted

r17845: Add constructor taking original problem data and new dataset.

comment:3 Changed 4 months ago by bburlacu

  • Owner changed from bburlacu to mkommend
  • Status changed from accepted to reviewing

comment:4 Changed 2 months ago by mkommend

  • Version changed from branch to trunk

comment:5 Changed 2 months ago by mkommend

  • Owner changed from mkommend to bburlacu
  • Status changed from reviewing to assigned

Reviewed r17835 and r17845 and the changes look good and hopefully reduce the possibilities for bugs.

For the sake of completeness and consisteny, could you please provide the same functionality for regression problem data as well.

Note: See TracTickets for help on using tickets.