Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TargetEncoder example code #31365

Copy link
Copy link
Closed
Closed
Copy link
@mathisdrn

Description

@mathisdrn
Issue body actions

Describe the issue linked to the documentation

The example used in the stable TargetEncoder documentation is confusing as the order of the label (that is: dog, cat, snake) is not coherent with the expected order of enc_low_smooth.encodings_ (the 80 corresponds to 'dog' but is is in second order not first).

Printing TargetEncoder.categories_ reveal that the order is indeed coherent with TargetEncoder.encodings_. However, as I was trying to understand where this difference of order came from, I wasn't able to find in TargetEncoder class definition where self.categories_ was set.

Suggest a potential alternative/fix

  • make it more explicit in documentation, such as adding a print of enc_auto.categories_
  • make TargetEncoder() preserve the columns order found in the dataset

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.