You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there's an incompatibility between synthcity and the new 1.4 version of scikit_learn?
How to Reproduce
I tried running the 'load and run a tabular generator' bit from the docs and got an error. OneHotEncoder.__init__() got an unexpected keyword 'sparse'
Click to view screenshot of code and error:
Expected Behavior
It should fit the model without an error
Workaround
The OneHotEncoder docs saysparse was renamed to sparse_output. The new parameter was introduced in scikit_learn 1.2 and the old one removed in scikit_learn 1.4.
I fixed my local installation by downgrading scikit_learn to 1.3.2. pip install --upgrade scikit_learn==1.3.2
Possible fix
I checked the stack trace and I think it might be possible to fix it with a one-line change. I haven't actually tried it! I'm not setup as a contributor.
Change sparse to sparse_output in line 63 in tabular_encoder.py : I.e. this line
Hi MarkJacksonRG, Many thanks for your issue! This has now been resolved in the manner you described. This can been seen in #253. If you should ever want to contribute in the future it is very easy (see CONTRIBUTING.MD)!
Description
I think there's an incompatibility between
synthcity
and the new 1.4 version ofscikit_learn
?How to Reproduce
I tried running the 'load and run a tabular generator' bit from the docs and got an error.
OneHotEncoder.__init__() got an unexpected keyword 'sparse'
Click to view screenshot of code and error:
Expected Behavior
It should fit the model without an error
Workaround
The OneHotEncoder docs say
sparse
was renamed tosparse_output
. The new parameter was introduced inscikit_learn
1.2 and the old one removed inscikit_learn
1.4.I fixed my local installation by downgrading scikit_learn to 1.3.2.
pip install --upgrade scikit_learn==1.3.2
Possible fix
I checked the stack trace and I think it might be possible to fix it with a one-line change. I haven't actually tried it! I'm not setup as a contributor.
Change
sparse
tosparse_output
in line 63 intabular_encoder.py
: I.e. this linecat_encoder_params: dict = dict(handle_unknown="ignore", sparse=False)
I thought I would flag it here in case it's something the community want to fix. I think you'd need to require scikit_learn 1.2 and greater.
System Information
The text was updated successfully, but these errors were encountered: