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.
The
get_top_features()function currently creates and sorts by the absolute value of feature weights regardless of the absolute_values argument. Specifically: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 ofonly_positiveandonly_negativebut then I wonder what is the use ofabsolute_values.