-
Notifications
You must be signed in to change notification settings - Fork 561
MAINT Use class_of_interest in DecisionBoundaryDisplay #772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAINT Use class_of_interest in DecisionBoundaryDisplay #772
Conversation
I see an occurrence where we could reuse the axis from the first display, it seems more natural. import matplotlib.pyplot as plt
import matplotlib as mpl
import seaborn as sns
from sklearn.inspection import DecisionBoundaryDisplay
tab10_norm = mpl.colors.Normalize(vmin=-0.5, vmax=8.5)
palette = ["tab:blue", "tab:green", "tab:orange"]
disp = DecisionBoundaryDisplay.from_estimator(
tree,
data_train,
response_method="predict",
cmap="tab10",
norm=tab10_norm,
alpha=0.5,
)
sns.scatterplot(
data=penguins,
x=culmen_columns[0],
y=culmen_columns[1],
hue=target_column,
palette=palette,
ax=disp.ax_,
)
disp.ax_.legend(bbox_to_anchor=(1.05, 1), loc="upper left")
_ = disp.ax_.set_title("Decision boundary using a decision tree") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise.
If this is already there in 1.4, we can directly target |
According to #789, we are currently running on v1.3. I confirmed this by running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did another pass of rephrasing.
+1 for merging to update-to-scikit-learn-1.6
and pushing a resync of the notebooks / exercises in that branch to check the CI.
501b997
to
bb5f3df
Compare
* Feature branch to update to 1.6 * MNT Fix several FutureWarnings (#810) * MTN Wrap up quiz sklearn 1.6 verification (#817) * MAINT Use class_of_interest in DecisionBoundaryDisplay (#772) * Resync everything --------- Co-authored-by: Arturo Amor <[email protected]> Co-authored-by: SebastienMelo <[email protected]>
* Feature branch to update to 1.6 * MNT Fix several FutureWarnings (#810) * MTN Wrap up quiz sklearn 1.6 verification (#817) * MAINT Use class_of_interest in DecisionBoundaryDisplay (#772) * Resync everything --------- Co-authored-by: Arturo Amor <[email protected]> Co-authored-by: SebastienMelo <[email protected]> c9728c8
Since scikit-learn v1.4
DecisionBoundaryDisplay
acceptsclass_of_interest
for multiclass visualization. This feature is promised in the current version of the MOOC.Notice that, as it requires updating the minimal version, it may change the experience of current enrolled participants.