Skip to content

[BUG]: When applying the smote algorithm, an error is reported #4079

@zhangkaicr

Description

@zhangkaicr

pycaret version checks

Issue Description

Thank you very much for making a docker image for this library. I installed your latest image on the local docker and processed my data. Other codes can run normally, but when I want to apply the somte algorithm, the following error is reported

# import pycaret classification and init setup from pycaret.classification import * s = setup(df, target = 'Discharge_status', session_id = 2023, normalize = True, normalize_method = 'minmax', numeric_imputation ="knn", fix_imbalance = True)

image

image

image
image
`Package Version


adagio 0.2.4
aiofiles 23.1.0
aiohttp 3.8.4
aiosignal 1.3.1
alembic 1.10.2
altair 4.2.2
ansi2html 1.8.0
antlr4-python3-runtime 4.11.1
anyio 3.6.2
appdirs 1.4.4
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.2.1
async-generator 1.10
async-timeout 4.0.2
attrs 22.2.0
autoviz 0.1.58
backcall 0.2.0
backports.functools-lru-cache 1.6.4
beautifulsoup4 4.12.0
bleach 6.0.0
bokeh 2.4.3
boto3 1.26.95
botocore 1.29.95
catboost 1.1.1
category-encoders 2.6.0
certifi 2022.12.7
cffi 1.15.1
charset-normalizer 3.1.0
click 8.1.3
cloudpickle 2.2.1
cmaes 0.9.1
codecov 2.1.12
colorcet 3.0.1
colorlog 6.7.0
colour 0.1.5
comm 0.1.2
contourpy 1.0.7
coverage 7.2.2
cryptography 39.0.2
cycler 0.11.0
Cython 0.29.33
daal 2023.0.1
daal4py 2023.0.1
dash 2.9.1
dash-auth 2.0.0
dash-bootstrap-components 1.4.1
dash-core-components 2.0.0
dash-cytoscape 0.3.0
dash-html-components 2.0.0
dash-table 5.0.0
dash-testing-stub 0.0.2
dask 2023.3.1
databricks-cli 0.17.5
debugpy 1.6.6
decorator 5.1.1
deepchecks 0.13.0
defusedxml 0.7.1
Deprecated 1.2.13
deprecation 2.1.0
dill 0.3.6
distlib 0.3.6
distributed 2023.3.1
docker 6.0.1
dtreeviz 2.2.0
emoji 2.2.0
entrypoints 0.4
et-xmlfile 1.1.0
evidently 0.2.6
exceptiongroup 1.1.1
executing 1.2.0
explainerdashboard 0.4.2.1
fairlearn 0.7.0
fastapi 0.95.0
fastjsonschema 2.16.3
ffmpy 0.3.0
filelock 3.10.0
Flask 2.2.3
flask-simplelogin 0.1.1
Flask-WTF 0.15.1
fonttools 4.39.2
frozenlist 1.3.3
fs 2.4.16
fsspec 2023.3.0
fugue 0.8.1
fugue-sql-antlr 0.1.5
future 0.18.3
gevent 22.10.2
gitdb 4.0.10
GitPython 3.1.31
gradio 3.22.1
graphviz 0.20.1
greenlet 2.0.2
grpcio 1.51.3
gunicorn 20.1.0
h11 0.14.0
HeapDict 1.0.1
holoviews 1.14.9
htmlmin 0.1.12
httpcore 0.16.3
httpx 0.23.3
huggingface-hub 0.13.3
hvplot 0.8.3
hyperopt 0.2.7
idna 3.4
ImageHash 4.3.1
imageio 2.26.1
imbalanced-learn 0.10.1
importlib-metadata 5.2.0
importlib-resources 5.12.0
iniconfig 2.0.0
interpret 0.3.2
interpret_community 0.31.0
interpret-core 0.3.2
ipykernel 6.22.0
ipython 7.34.0
ipython-genutils 0.2.0
ipywidgets 7.7.3
itsdangerous 2.1.2
jedi 0.18.2
Jinja2 3.1.2
jmespath 1.0.1
joblib 1.2.0
jsonpickle 3.0.1
jsonschema 4.17.3
jupyter 1.0.0
jupyter_client 8.0.3
jupyter-console 6.6.3
jupyter_core 5.3.0
jupyter-dash 0.4.2
jupyter-server 1.23.6
jupyterlab-pygments 0.2.2
jupyterlab-widgets 1.1.2
kaleido 0.2.1
kiwisolver 1.4.4
kmodes 0.12.2
lazy_loader 0.1
lightgbm 3.3.5
lime 0.2.0.1
linkify-it-py 2.0.0
llvmlite 0.39.1
locket 1.0.0
lxml 4.9.2
m2cgen 0.10.0
Mako 1.2.4
Markdown 3.4.1
markdown-it-py 2.2.0
MarkupSafe 2.1.2
matplotlib 3.6.3
matplotlib-inline 0.1.6
mdit-py-plugins 0.3.3
mdurl 0.1.2
mistune 2.0.5
ml_wrappers 0.5.6
mlflow 1.30.0
mlxtend 0.21.0
moto 4.1.5
msgpack 1.0.5
multidict 6.0.4
multimethod 1.9.1
multiprocess 0.70.14
nbclassic 0.5.3
nbclient 0.7.2
nbconvert 7.2.10
nbformat 5.8.0
nest-asyncio 1.5.6
networkx 3.0
nltk 3.8.1
notebook 6.5.3
notebook_shim 0.2.2
numba 0.56.4
numpy 1.23.5
oauthlib 3.2.2
openpyxl 3.1.5
optuna 3.1.0
orjson 3.8.8
outcome 1.2.0
oyaml 1.0
packaging 21.3
pandas 1.5.3
pandas-profiling 3.6.6
pandocfilters 1.5.0
panel 0.12.7
param 1.13.0
parso 0.8.3
partd 1.3.0
patsy 0.5.3
percy 2.0.2
pexpect 4.8.0
phik 0.12.3
pickleshare 0.7.5
Pillow 9.4.0
pip 23.0.1
pkgutil_resolve_name 1.3.10
platformdirs 3.1.1
plotly 5.13.1
plotly-resampler 0.8.3.2
pluggy 1.0.0
pmdarima 2.0.3
prometheus-client 0.16.0
prometheus-flask-exporter 0.22.3
prompt-toolkit 3.0.38
protobuf 3.20.3
psutil 5.9.4
ptyprocess 0.7.0
pure-eval 0.2.2
py4j 0.10.9.7
pyamg 4.2.3
pyaml 21.10.1
pyarrow 11.0.0
pycaret 3.0.0
pycparser 2.21
pyct 0.5.0
pydantic 1.10.6
pydub 0.25.1
Pygments 2.14.0
PyJWT 2.6.0
pynndescent 0.5.8
PyNomaly 0.3.3
pyod 1.0.9
pyOpenSSL 23.0.0
pyparsing 3.0.9
pyrsistent 0.19.3
PySocks 1.7.1
pytest 7.2.2
python-dateutil 2.8.2
python-multipart 0.0.6
python-utils 3.5.2
pytz 2022.7.1
pyviz-comms 2.2.1
PyWavelets 1.4.1
PyYAML 5.4.1
pyzmq 23.2.1
qpd 0.4.0
qtconsole 5.4.1
QtPy 2.3.0
querystring-parser 1.2.4
raiutils 0.4.2
ray 2.3.0
regex 2022.10.31
requests 2.28.2
responses 0.23.1
retrying 1.3.4
rfc3986 1.5.0
s3transfer 0.6.0
SALib 1.4.7
schemdraw 0.15
scikit-image 0.20.0
scikit-learn 1.2.2
scikit-learn-intelex 2023.0.1
scikit-optimize 0.9.0
scikit-plot 0.3.7
scipy 1.9.1
seaborn 0.12.2
selenium 4.2.0
Send2Trash 1.8.0
setuptools 60.10.0
shap 0.41.0
six 1.16.0
skope-rules 1.0.1
sktime 0.16.1
slicer 0.0.7
smmap 5.0.0
sniffio 1.3.0
sortedcontainers 2.4.0
soupsieve 2.4
SQLAlchemy 1.4.47
sqlglot 11.4.1
sqlparse 0.4.3
stack-data 0.6.2
starlette 0.26.1
statsforecast 1.5.0
statsmodels 0.13.5
tabulate 0.9.0
tangled-up-in-unicode 0.2.0
tbats 1.1.2
tbb 2021.8.0
tblib 1.7.0
tenacity 8.2.2
tensorboardX 2.6
terminado 0.17.1
textblob 0.17.1
threadpoolctl 3.1.0
tifffile 2023.3.15
tinycss2 1.2.1
tomli 2.0.1
toolz 0.12.0
tornado 6.2
tqdm 4.64.1
trace-updater 0.0.9
traitlets 5.9.0
treeinterpreter 0.2.3
triad 0.8.4
trio 0.22.0
trio-websocket 0.10.2
tune-sklearn 0.4.5
typeguard 2.13.3
types-PyYAML 6.0.12.8
typing_extensions 4.5.0
uc-micro-py 1.0.1
umap-learn 0.5.3
urllib3 1.26.15
urllib3-secure-extra 0.1.0
uvicorn 0.21.1
virtualenv 20.21.0
visions 0.7.5
waitress 2.1.2
wcwidth 0.2.6
webencodings 0.5.1
websocket-client 1.5.1
websockets 10.4
Werkzeug 2.2.3
wheel 0.40.0
widgetsnbextension 3.6.2
wordcloud 1.8.2.2
wrapt 1.15.0
wsproto 1.2.0
WTForms 3.0.1
wurlitzer 3.0.3
xgboost 1.7.4
xlrd 2.0.1
xmltodict 0.13.0
xxhash 3.2.0
yarl 1.8.2
ydata-profiling 4.1.1
yellowbrick 1.5
zict 2.2.0
zipp 3.15.0
zope.event 4.6
zope.interface 6.0
Note: you may need to restart the kernel to use updated packages.`

Reproducible Example

from pycaret.classification import *
s = setup(df, 
          target = 'Discharge_status', 
          session_id = 2023,
          normalize = True, 
          normalize_method = 'minmax',
          numeric_imputation ="knn")

Expected Behavior

image

Actual Results

As shown in the figure above, normal operation

Installed Versions

`Package Version


adagio 0.2.4
aiofiles 23.1.0
aiohttp 3.8.4
aiosignal 1.3.1
alembic 1.10.2
altair 4.2.2
ansi2html 1.8.0
antlr4-python3-runtime 4.11.1
anyio 3.6.2
appdirs 1.4.4
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.2.1
async-generator 1.10
async-timeout 4.0.2
attrs 22.2.0
autoviz 0.1.58
backcall 0.2.0
backports.functools-lru-cache 1.6.4
beautifulsoup4 4.12.0
bleach 6.0.0
bokeh 2.4.3
boto3 1.26.95
botocore 1.29.95
catboost 1.1.1
category-encoders 2.6.0
certifi 2022.12.7
cffi 1.15.1
charset-normalizer 3.1.0
click 8.1.3
cloudpickle 2.2.1
cmaes 0.9.1
codecov 2.1.12
colorcet 3.0.1
colorlog 6.7.0
colour 0.1.5
comm 0.1.2
contourpy 1.0.7
coverage 7.2.2
cryptography 39.0.2
cycler 0.11.0
Cython 0.29.33
daal 2023.0.1
daal4py 2023.0.1
dash 2.9.1
dash-auth 2.0.0
dash-bootstrap-components 1.4.1
dash-core-components 2.0.0
dash-cytoscape 0.3.0
dash-html-components 2.0.0
dash-table 5.0.0
dash-testing-stub 0.0.2
dask 2023.3.1
databricks-cli 0.17.5
debugpy 1.6.6
decorator 5.1.1
deepchecks 0.13.0
defusedxml 0.7.1
Deprecated 1.2.13
deprecation 2.1.0
dill 0.3.6
distlib 0.3.6
distributed 2023.3.1
docker 6.0.1
dtreeviz 2.2.0
emoji 2.2.0
entrypoints 0.4
et-xmlfile 1.1.0
evidently 0.2.6
exceptiongroup 1.1.1
executing 1.2.0
explainerdashboard 0.4.2.1
fairlearn 0.7.0
fastapi 0.95.0
fastjsonschema 2.16.3
ffmpy 0.3.0
filelock 3.10.0
Flask 2.2.3
flask-simplelogin 0.1.1
Flask-WTF 0.15.1
fonttools 4.39.2
frozenlist 1.3.3
fs 2.4.16
fsspec 2023.3.0
fugue 0.8.1
fugue-sql-antlr 0.1.5
future 0.18.3
gevent 22.10.2
gitdb 4.0.10
GitPython 3.1.31
gradio 3.22.1
graphviz 0.20.1
greenlet 2.0.2
grpcio 1.51.3
gunicorn 20.1.0
h11 0.14.0
HeapDict 1.0.1
holoviews 1.14.9
htmlmin 0.1.12
httpcore 0.16.3
httpx 0.23.3
huggingface-hub 0.13.3
hvplot 0.8.3
hyperopt 0.2.7
idna 3.4
ImageHash 4.3.1
imageio 2.26.1
imbalanced-learn 0.10.1
importlib-metadata 5.2.0
importlib-resources 5.12.0
iniconfig 2.0.0
interpret 0.3.2
interpret_community 0.31.0
interpret-core 0.3.2
ipykernel 6.22.0
ipython 7.34.0
ipython-genutils 0.2.0
ipywidgets 7.7.3
itsdangerous 2.1.2
jedi 0.18.2
Jinja2 3.1.2
jmespath 1.0.1
joblib 1.2.0
jsonpickle 3.0.1
jsonschema 4.17.3
jupyter 1.0.0
jupyter_client 8.0.3
jupyter-console 6.6.3
jupyter_core 5.3.0
jupyter-dash 0.4.2
jupyter-server 1.23.6
jupyterlab-pygments 0.2.2
jupyterlab-widgets 1.1.2
kaleido 0.2.1
kiwisolver 1.4.4
kmodes 0.12.2
lazy_loader 0.1
lightgbm 3.3.5
lime 0.2.0.1
linkify-it-py 2.0.0
llvmlite 0.39.1
locket 1.0.0
lxml 4.9.2
m2cgen 0.10.0
Mako 1.2.4
Markdown 3.4.1
markdown-it-py 2.2.0
MarkupSafe 2.1.2
matplotlib 3.6.3
matplotlib-inline 0.1.6
mdit-py-plugins 0.3.3
mdurl 0.1.2
mistune 2.0.5
ml_wrappers 0.5.6
mlflow 1.30.0
mlxtend 0.21.0
moto 4.1.5
msgpack 1.0.5
multidict 6.0.4
multimethod 1.9.1
multiprocess 0.70.14
nbclassic 0.5.3
nbclient 0.7.2
nbconvert 7.2.10
nbformat 5.8.0
nest-asyncio 1.5.6
networkx 3.0
nltk 3.8.1
notebook 6.5.3
notebook_shim 0.2.2
numba 0.56.4
numpy 1.23.5
oauthlib 3.2.2
openpyxl 3.1.5
optuna 3.1.0
orjson 3.8.8
outcome 1.2.0
oyaml 1.0
packaging 21.3
pandas 1.5.3
pandas-profiling 3.6.6
pandocfilters 1.5.0
panel 0.12.7
param 1.13.0
parso 0.8.3
partd 1.3.0
patsy 0.5.3
percy 2.0.2
pexpect 4.8.0
phik 0.12.3
pickleshare 0.7.5
Pillow 9.4.0
pip 23.0.1
pkgutil_resolve_name 1.3.10
platformdirs 3.1.1
plotly 5.13.1
plotly-resampler 0.8.3.2
pluggy 1.0.0
pmdarima 2.0.3
prometheus-client 0.16.0
prometheus-flask-exporter 0.22.3
prompt-toolkit 3.0.38
protobuf 3.20.3
psutil 5.9.4
ptyprocess 0.7.0
pure-eval 0.2.2
py4j 0.10.9.7
pyamg 4.2.3
pyaml 21.10.1
pyarrow 11.0.0
pycaret 3.0.0
pycparser 2.21
pyct 0.5.0
pydantic 1.10.6
pydub 0.25.1
Pygments 2.14.0
PyJWT 2.6.0
pynndescent 0.5.8
PyNomaly 0.3.3
pyod 1.0.9
pyOpenSSL 23.0.0
pyparsing 3.0.9
pyrsistent 0.19.3
PySocks 1.7.1
pytest 7.2.2
python-dateutil 2.8.2
python-multipart 0.0.6
python-utils 3.5.2
pytz 2022.7.1
pyviz-comms 2.2.1
PyWavelets 1.4.1
PyYAML 5.4.1
pyzmq 23.2.1
qpd 0.4.0
qtconsole 5.4.1
QtPy 2.3.0
querystring-parser 1.2.4
raiutils 0.4.2
ray 2.3.0
regex 2022.10.31
requests 2.28.2
responses 0.23.1
retrying 1.3.4
rfc3986 1.5.0
s3transfer 0.6.0
SALib 1.4.7
schemdraw 0.15
scikit-image 0.20.0
scikit-learn 1.2.2
scikit-learn-intelex 2023.0.1
scikit-optimize 0.9.0
scikit-plot 0.3.7
scipy 1.9.1
seaborn 0.12.2
selenium 4.2.0
Send2Trash 1.8.0
setuptools 60.10.0
shap 0.41.0
six 1.16.0
skope-rules 1.0.1
sktime 0.16.1
slicer 0.0.7
smmap 5.0.0
sniffio 1.3.0
sortedcontainers 2.4.0
soupsieve 2.4
SQLAlchemy 1.4.47
sqlglot 11.4.1
sqlparse 0.4.3
stack-data 0.6.2
starlette 0.26.1
statsforecast 1.5.0
statsmodels 0.13.5
tabulate 0.9.0
tangled-up-in-unicode 0.2.0
tbats 1.1.2
tbb 2021.8.0
tblib 1.7.0
tenacity 8.2.2
tensorboardX 2.6
terminado 0.17.1
textblob 0.17.1
threadpoolctl 3.1.0
tifffile 2023.3.15
tinycss2 1.2.1
tomli 2.0.1
toolz 0.12.0
tornado 6.2
tqdm 4.64.1
trace-updater 0.0.9
traitlets 5.9.0
treeinterpreter 0.2.3
triad 0.8.4
trio 0.22.0
trio-websocket 0.10.2
tune-sklearn 0.4.5
typeguard 2.13.3
types-PyYAML 6.0.12.8
typing_extensions 4.5.0
uc-micro-py 1.0.1
umap-learn 0.5.3
urllib3 1.26.15
urllib3-secure-extra 0.1.0
uvicorn 0.21.1
virtualenv 20.21.0
visions 0.7.5
waitress 2.1.2
wcwidth 0.2.6
webencodings 0.5.1
websocket-client 1.5.1
websockets 10.4
Werkzeug 2.2.3
wheel 0.40.0
widgetsnbextension 3.6.2
wordcloud 1.8.2.2
wrapt 1.15.0
wsproto 1.2.0
WTForms 3.0.1
wurlitzer 3.0.3
xgboost 1.7.4
xlrd 2.0.1
xmltodict 0.13.0
xxhash 3.2.0
yarl 1.8.2
ydata-profiling 4.1.1
yellowbrick 1.5
zict 2.2.0
zipp 3.15.0
zope.event 4.6
zope.interface 6.0
Note: you may need to restart the kernel to use updated packages.`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions