Describe the bug
While fitting the model FAMD using the given data, the program ends with an error message. The class OneHotEncoder class does not have the method get_feature_names. This method was deprecated in the scikit-learn version 1.0 and renamed to get_feature_names_out in the version 1.2.
To Reproduce
Steps to reproduce the behaviour:
Instantiate an object of FAMD class
Call the method fit by giving the training data
Run the python script
Observe the error message
Expected behaviour
It was expected to fit the model using the given data successfully.
/home/quadmin/.local/lib/python3.8/site-packages/sklearn/preprocessing/_encoders.py:868: FutureWarning: `sparse` was renamed to `sparse_output` in version 1.2 and will be removed in 1.4. `sparse_output` is ignored unless you leave `sparse` to its default value.
warnings.warn(
Traceback (most recent call last):
File "famd-light.py", line 40, in <module>
famd.fit(X)
File "/home/quadmin/.local/lib/python3.8/site-packages/light_famd/famd.py", line 45, in fit
return super().fit(X)
File "/home/quadmin/.local/lib/python3.8/site-packages/light_famd/mfa.py", line 68, in fit
self.partial_factor_analysis_[name] = fa.fit(X.loc[:, cols])
File "/home/quadmin/.local/lib/python3.8/site-packages/light_famd/mca.py", line 20, in fit
self.one_hot_ = one_hot.OneHotEncoder().fit(X)
File "/home/quadmin/.local/lib/python3.8/site-packages/light_famd/one_hot.py", line 20, in fit
self.column_names_ = self.get_feature_names(X.columns if hasattr( X,'columns') else None)
AttributeError: 'OneHotEncoder' object has no attribute 'get_feature_names'
Describe the bug While fitting the model FAMD using the given data, the program ends with an error message. The class
OneHotEncoder
class does not have the methodget_feature_names
. This method was deprecated in the scikit-learn version 1.0 and renamed toget_feature_names_out
in the version 1.2.To Reproduce Steps to reproduce the behaviour:
FAMD
classfit
by giving the training dataExpected behaviour It was expected to fit the model using the given data successfully.
Screenshots
System information: