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.
script
```python
# Paste your code here. The following is an example.
from sapientml import SapientMLGenerator
sml = SapientMLGenerator()
sml.generate_code('your arguments')
```
Attach the datasets or dataframes input to generate_code() if possible.
Show the generated code such as 1_default.py when it was generated.
generated code
```python
# Paste the generated code here.
```
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):
OS: [e.g. Ubuntu 20.04]
Docker Version (if applicable): [Docker version 20.10.17, build 100c701]
Python Version: [e.g. 3.9.12]
SapientML Version: 0.5.4
Additional context
For the following code line 1020, fix the condition to vc.shape[0] > 10(if follow the comment) or delete it.
# if there are more than 10 categories, probably it is a regression problem
if vc.shape[0] > 2:
return 0
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:
generate_code()
.script
```python # Paste your code here. The following is an example. from sapientml import SapientMLGenerator sml = SapientMLGenerator() sml.generate_code('your arguments') ```generate_code()
if possible.1_default.py
when it was generated.generated code
```python # Paste the generated code here. ```Expected behavior A clear and concise description of what you expected to happen.
Environment (please complete the following information):
Additional context
vc.shape[0] > 10(if follow the comment)
or delete it.