sapientml / core

A SapientML plugin of SapientMLGenerator
Apache License 2.0
10 stars 12 forks source link

For multi-targets, SMOTE is not recommended even if there is a bias #36

Open mariko-sugawara opened 11 months ago

mariko-sugawara commented 11 months ago

Describe the bug At _get_target_imbalance_score(), if the target column has multiclass, the imbalance score is calculated as 0 and SMOTE is not recommended for preprocess.

https://github.com/sapientml/core/blob/f0d33b10fa82d4c77a7174a51aa29ea9072d864c/sapientml_core/meta_features.py#L1012

To Reproduce Steps to reproduce the behavior:

  1. Show your code calling generate_code().
script ```python # Paste your code here. The following is an example. from sapientml import SapientMLGenerator sml = SapientMLGenerator() sml.generate_code('your arguments') ```
  1. Attach the datasets or dataframes input to generate_code() if possible.
  2. Show the generated code such as 1_default.py when it was generated.
generated code ```python # Paste the generated code here. ```
  1. Show the messages of SapientML and/or generated code.

Expected behavior A clear and concise description of what you expected to happen.

Environment (please complete the following information):

Additional context