Skip to content

Commit

Permalink
rename plot accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre committed Jan 3, 2025
1 parent 4b23afb commit 2df34d1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions skore/src/skore/sklearn/_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,11 @@ def _get_X_y_and_data_source_hash(self, *, data_source, X=None, y=None):


########################################################################################
# Plotting accessor
# Plotting accessor for metrics
########################################################################################


class _PlotAccessor(_BaseAccessor):
class _PlotMetricsAccessor(_BaseAccessor):
def __init__(self, parent):
# Note: parent here will be the MetricsAccessor instance
super().__init__(parent._parent, icon="🎨")
Expand Down Expand Up @@ -756,6 +756,9 @@ def prediction_error(

return display

def _get_help_title(self):
return f"{self._icon} Available plot methods"


###############################################################################
# Metrics accessor
Expand All @@ -780,7 +783,7 @@ class _MetricsAccessor(_BaseAccessor):
def __init__(self, parent):
super().__init__(parent, icon="📏")
# Create plot sub-accessor
self.plot = _PlotAccessor(self)
self.plot = _PlotMetricsAccessor(self)

# TODO: should build on the `add_scorers` function
def report_metrics(
Expand Down

0 comments on commit 2df34d1

Please sign in to comment.