scikit-learn-contrib / category_encoders

A library of sklearn compatible categorical variable encoders
http://contrib.scikit-learn.org/category_encoders/
BSD 3-Clause "New" or "Revised" License
2.39k stars 393 forks source link

Combining Glmm Encoder with the PolynominalWrapper for Mutlinomial-classification #404

Closed DerSchneemann94 closed 11 months ago

DerSchneemann94 commented 1 year ago

Hello people, when trying to run the Glmm Encoder with Polynomialwrapper to encode a dataset with multinomial dataset the procedure fails. I have no clue what i am doing wrong or if it has to do with the implementation being faulty.

Expected Behavior

The data is properly encoded.

Actual Behavior

The process throws the following exception. exception The input data and label are as follows: data: data

label: label

Steps to Reproduce the Problem

  1. Create a GLMMEnoder with return_df = True and binomial_target = True.
  2. Create a PolynomialWrapper with the encoder form step 1 as a constructor argument
  3. Execute the fit_transform method on the Polynomialwrapper with data and label from the images.
  4. Python returns the excepetion.

    Specifications

    • Version: 2.6.0
    • Platform: Linux
    • Subsystem: Ubuntu
bmreiniger commented 1 year ago

Your traceback doesn't seem to mention category_encoders anywhere, so it's hard to see where the error really originates. Can you create a minimal reproducible example (use a subset of your data that's sharable, or a toy dataset, and apply the steps you've mentioned, ensuring the same error gets raised)?

PaulWestenthanner commented 1 year ago

Also to me it seems like the problem might be on your end, more specifically in the execute_experiment_file.py line 92 (which is probably some try-except that re-raises the previously caught exception). Have a look there or please provide us a reproducible mimimum example

PaulWestenthanner commented 11 months ago

closing this for inactivity