shankarpandala / lazypredict

Lazy Predict help build a lot of basic models without much code and helps understand which models works better without any parameter tuning
MIT License
2.87k stars 333 forks source link

TypeError (OneHotEncoder) on importing LazyRegressor from lazypredict.Supervised #441

Closed ehsanyousefzadehasl closed 8 months ago

ehsanyousefzadehasl commented 8 months ago

The following error appears on "from lazypredict.Supervised import LazyRegressor"

File "", line 1, in File "C:\Users\ ... \Python312\site-packages\lazypredict\Supervised.py", line 98, in ("encoding", OneHotEncoder(handle_unknown="ignore", sparse=False)), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: OneHotEncoder.init() got an unexpected keyword argument 'sparse'

Python version: 3.12.1 OS: windows 10

JSchoeck commented 8 months ago

The keyword changed to sparse_output.

ehsanyousefzadehasl commented 8 months ago

Tested and it worked without the issue. Closed this issue.