cobra icon indicating copy to clipboard operation
cobra copied to clipboard

Add continuous and discrete variables as attribute to the preprocessor

Open patrickleonardy opened this issue 1 year ago • 0 comments

Add continuous and discrete variables as attributes to the Preprocessor

Problem: Currently we have to pass continuous and discrete variable names to the fit and transform functions of the Preprocessor It would be better to pass those variable names only once to the fit function and then reuse this information in the transform function.

Reason: As far as I am aware, the columns should never change for the Preprocessor so why should we pass them several times to the same object? Passing lists that are supposed to stay the same several times can cause errors and can also confuse the user.

Task Description

  1. This issue will add continuous and discrete variable names as attributes to the Preprocessor object to be able to define those only once in the fit function or in the object creation.
  2. The Preprocessor then should be refactored to use this attribute
  3. Check if everything is still working as expected

Note:

The Preprocessor should still be able to preprocess a DataFrame that contains not all the variables (in case we want to use the same Preprocessor with data where a column is missing).

patrickleonardy avatar May 15 '23 11:05 patrickleonardy