Closed it176131 closed 3 months ago
Thanks for the note, and this sounds like a great improvement. Unfortunately, I have limited capacity to update and improve mlxtend due to other projects having higher priority and keeping me busy. However, if you'd like to work on a PR, I'd be more than happy to help merge it.
Thanks for the note, and this sounds like a great improvement. Unfortunately, I have limited capacity to update and improve mlxtend due to other projects having higher priority and keeping me busy. However, if you'd like to work on a PR, I'd be more than happy to help merge it.
I'd be happy to submit a PR! I'll link to this issue and tag you.
Describe the workflow you want to enable
In
scikit-learn
version 1.2, theset_output
API was introduced. I would like to expose the API inside of themlxtend.preprocessing.transactionencoder.TransactionEncoder
class. This would allow the user to set the output of :method:TransactionEncoder.fit_transform
and :method:TransactionEncoder.transform
to apandas.DataFrame
by default, rather than having to manually create the object after transformation.Describe your proposed solution
My proposed solution is to define the :method:
get_feature_names_out
in :class:TransactionEncoder
as this is required to expose the :method:set_output
. See :class:TransformerMixin
and Developer API forset_output
for more details.Describe alternatives you've considered, if relevant
Continue using the method described in the User Guide—convert the output of the transformer to a
pandas.DataFrame
manually.Additional context
scikit-learn
to increase from 1.0.2 to 1.2.2.