[scikit-learn] SLEP013 VOTE: n_features_out_

Adrin adrin.jalali at gmail.com
Wed Feb 19 11:52:04 EST 2020


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20200219/9f796930/attachment.html>


More information about the scikit-learn mailing list