-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
rfc (api): revisit the option to return a single scalar when calling a metric #1259
Comments
I'd be happy a solution like this:
Other possible solution, to take into account the various df :
But, pfiou, it seems less fluid for like 0 additional value. |
Personally I like the consistency of all |
As a user, I'd find it very odd if
So to me the natural thing here is to return the simplest form that each metric returns. When it comes to wanting to show several metrics in the same table, we can have a separate method to return a table, such as: skore.set_config(dataframe="polars")
report.metrics[["accuracy", "balanced_accuracy", "f1", "precision", "recall"]]
# or
report.metrics.as_frame(["accuracy", "f1", ...], dataframe="polars") |
Summarizing some thoughts that we got IRL with @adrinjalali that could simplify the API and answer the needs. I'll open subsequent dedicated issues reflecting some discussions here: People have expectation when calling: report.metrics.subsequent_metric(...) It should be most probably a Python object like For metrics, we should force least ambiguous Python type but that should not change depending of the input. Let's provide two examples: report.metrics.accuracy() will return a report.metrics.precision() will return a When it comes to consolidate the metrics into a report, the At the end, we do not need anymore a new parameter which is what I like about it. Most probably not perfect for everyone but answer the need of many. |
Thanks +1 : the pandas dataframe with all metrics accessible in |
What's the usual process for an rfc issue? Can we close it now that we have #1275 to implement the decision? |
Yep, the Definition of Done for this is that a decision was made. |
In
EstimatorReport
andCrossValidationReport
, it can happen that a metric will return a dataframe with a single scalar in it. From several discussions it comes to the following trade-off:A really explicit solution would be to introduce a parameter for metric that can return a single value, for instance
as_type_if_scalar
that could be"frame"
or"float"
.However, I'm seeking for feedback to know if it is the way to go.
vs.
The text was updated successfully, but these errors were encountered: