Hi, SLEP013 <https://scikit-learn-enhancement-proposals.readthedocs.io/en/latest/slep013/proposal.html> proposes to add an "n_features_out_" attribute to track the number of output features to all estimators. Please cast your vote on this PR <https://github.com/scikit-learn/enhancement_proposals/pull/36> which proposes to accept the SLEP. Final comments are more than welcome.
Following is the short version of the SLEP. Regards, Adrin. Abstract ######## This SLEP proposes the introduction of a public ``n_features_out_`` attribute for most transformers (where relevant). Motivation ########## Knowing the number of features that a transformer outputs is useful for inspection purposes. This is in conjunction with `*SLEP010: ``n_features_in_``* < https://scikit-learn-enhancement-proposals.readthedocs.io/en/latest/slep010/proposal.html >`_. Solution ######## The proposed solution is for the ``n_features_out_`` attribute to be set once a call to ``fit`` is done. In many cases the value of ``n_features_out_`` is the same as some other attribute stored in the transformer, *e.g.* ``n_components_``, and in these cases a ``Mixin`` such as a ``ComponentsMixin`` can delegate ``n_features_out_`` to those attributes.
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn