Skip to content

Trained model get_top_features() #23

@nrclaudio

Description

@nrclaudio

The get_top_features() function currently creates and sorts by the absolute value of feature weights regardless of the absolute_values argument. Specifically:

wm = wm.assign(value_abs=lambda x: x.value.abs())
wm = wm.sort_values(["factor", "value_abs"], ascending=False)

So regardless of the value of absolute_values, the column is created anyway and feature selection is based on absolute weight magnitudes. Is this expected behaviour? I'm aware of only_positive and only_negative but then I wonder what is the use of absolute_values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions