Skip to content

refactor: Rewrite Displays using seaborn API #2190

@auguste-probabl

Description

@auguste-probabl

The different Displays are hard to maintain and extend; each new proposed option causes a new if-statement that makes the complexity of the code grow exponentially. The current occurrence of this is the data_source="both" option, proposed in #1874, and whose implementation has already begun; the next one after that is the subplots_by parameter proposed in #1445 and iterated on in #1720.

A proposed solution is inspired from #2152, which is to refactor the plotting logic to rely on seaborn's DataFrame-friendly API. Indeed, Display data is already stored as DataFrames and exposed through .frame().

One might further consider that .plot() could call .frame() itself, as is the case in #2177

Risk: This will not help us implement e.g. plotly representation.

Sub-tasks:

  • Refactor PrecisionRecallCurveDisplay using seaborn
  • Refactor RocCurveDisplay using seaborn
  • Refactor PredictionErrorCurveDisplay using seaborn

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions