Skip to content

Commit

Permalink
Only Plot Nominal Variable separately in Sensitivity Analysis plot (#…
Browse files Browse the repository at this point in the history
…2381)

Summary:
Pull Request resolved: #2381

In Sensitivity Analysis plot, we want to plot (unordered) categorical separately and shows that it "affects" metrics while still showing "increases"/"decreases" metrics for ordinal variables.

Reviewed By: dme65

Differential Revision: D56325368

fbshipit-source-id: 9e9e271d61f07f0e4c5fc952eced8d2c530aad4d
  • Loading branch information
Sunny Shen authored and facebook-github-bot committed Apr 19, 2024
1 parent eef87a0 commit a9dde4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ax/plot/feature_importances.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def plot_feature_importance_by_feature_plotly(
categorical_features = [
name
for name, par in model.model_space.parameters.items()
if isinstance(par, ChoiceParameter)
if isinstance(par, ChoiceParameter) and not par.is_ordered
]

for i, metric_name in enumerate(sorted(sensitivity_values.keys())):
Expand Down

0 comments on commit a9dde4a

Please sign in to comment.