Bug Report
Bug: When displaying the preprocessor one gets:
AttributeError: 'PreProcessor' object has no attribute 'categorical_data_processor'
Description
This is caused due to the fact that the PreProcessor object inherits form scikit-learn's BaseEstimator.
In the BaseEstimator docstring is written:
"""Base class for all estimators in scikit-learn.
Notes
-----
All estimators should specify all the parameters that can be set
at the class level in their ``__init__`` as explicit keyword
arguments (no ``*args`` or ``**kwargs``).
"""
In your implementation we have different names in __init__ and for the class attributes.
categorical_data_processor in __init__ and _categorical_data_processor as attribute.
Steps to Reproduce
- Import PreProcessor
from cobra.preprocessing import PreProcessor
- Create PreProcessor object
preprocessor = PreProcessor.from_params(model_type="regression")
- Try to show it (in a notebook)
preprocessor
Expected Result
I was expecting:

Actual Results
I actually got an AttributeError: 'PreProcessor' object has no attribute 'categorical_data_processor'
Bug Report
Bug: When displaying the preprocessor one gets:
AttributeError: 'PreProcessor' object has no attribute 'categorical_data_processor'
Description
This is caused due to the fact that the PreProcessor object inherits form scikit-learn's BaseEstimator.
In the BaseEstimator docstring is written:
In your implementation we have different names in
__init__and for the class attributes.categorical_data_processorin__init__and_categorical_data_processoras attribute.Steps to Reproduce
from cobra.preprocessing import PreProcessorpreprocessor = PreProcessor.from_params(model_type="regression")preprocessorExpected Result
I was expecting:

Actual Results
I actually got an AttributeError: 'PreProcessor' object has no attribute 'categorical_data_processor'